Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Cron running twice

Discussion in 'General Discussion' started by JanKrohn, Aug 16, 2016.

Tags:
  1. JanKrohn

    JanKrohn Active Member

    Joined:
    May 6, 2013
    Messages:
    37
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Phnom Penh
    cPanel Access Level:
    Root Administrator
    After upgrading to MariaDB 10.1 (not sure whether that's related) one of my cron jobs runs twice - interestingly not all the time. Sometimes it only runs once. It should be running every minute. Here's how it looks in the cron tab:

    Code:
    *    *    *    *    *    wget -O /dev/null http://www.demo.com/amazon/apps_timer.php
    I looked in /var/log/cron but user cron jobs are not logged. I checked that /dev/cron has the right permissions as well ("srw-rw----"). Content of /var/spool/cron and /etc/cron.d also looks entirely unsuspicious.

    When I look at the automated emails sent out by the cron, I notice some strange headers.

    Email 1:
    Code:
    Received: from [::1] (port=39099 helo=server.demo.com)
        by server.demo.com with esmtp (Exim 4.87)
        (envelope-from <apps-bounces@demo.com>)
        id 1bZY7d-00032L-Nt
        for Jan@demo.com; Tue, 16 Aug 2016 02:45:13 -0400
    
    Email 2:
    Code:
    Received: from [::1] (port=39100 helo=server.demo.com)
        by server.demo.com with esmtp (Exim 4.87)
        (envelope-from <apps-bounces@demo.com>)
        id 1bZY7d-00032O-Qx
        for Jan@demo.com; Tue, 16 Aug 2016 02:45:13 -0400
    
    The emails were sent at the exact same time, on different ports, with different message id's. From the random created multi-part boundary I also know the script actually ran twice, and that the email did not get duplicated elsewhere.

    I'm quite lost, and have no more ideas... Can anyone help please?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,161
    Likes Received:
    1,933
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Could you provide some more details on the script configured as a cron job? What actions does it take and what services does it interact with? Also, does the issue persists after restarting the "crond" service?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. JanKrohn

    JanKrohn Active Member

    Joined:
    May 6, 2013
    Messages:
    37
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Phnom Penh
    cPanel Access Level:
    Root Administrator
    I already rebooted the entire server, and restarted all individual services multiple times...
    The script collects stats and information (via cUrl and SOAP) in a MariaDB table every minute, and at 2:45 8:45, 14:45 and 20:45 additionally sends out a report of its previous 6 hours' activities to a Mailman mailing list.

    The last job run was good. The next one is due in 30 minutes. I've done a bit more restarting of services in the past 12 hours, so let's wait; maybe it's fixed now.
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,161
    Likes Received:
    1,933
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Feel free to open a support ticket using the link in my signature so we can take a closer look if the issue continues. You can post the ticket number here and we can update this thread with the outcome.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. dealpursue

    dealpursue Registered

    Joined:
    Aug 16, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    usa
    cPanel Access Level:
    Website Owner
    I am having the same issue on my site - Removed -

    This is very annoying as on google i am getting duplicate data. so i have stop crone until i find out what cause to run twice.
     
    #5 dealpursue, Aug 16, 2016
    Last edited by a moderator: Aug 16, 2016
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice