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 times - Different to when being run !!??

Discussion in 'General Discussion' started by djblamire, Jul 7, 2008.

  1. djblamire

    djblamire Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    253
    Likes Received:
    1
    Trophy Points:
    168
    I have had a fresh install on my dedicated server, and although times are set correctly in the cron, the times they actually take place are different.

    Here is a copy of my settings:

    Code:
    52 0 * * * /scripts/upcp
    0 1 * * * /scripts/cpbackup
    */15 * * * * /usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1
    2,58 * * * * /usr/local/bandmin/bandmin
    0 0 * * * /usr/local/bandmin/ipaddrmap
    14 22 * * * /usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl --notify
    */5 * * * * /usr/local/cpanel/bin/dcpumon >/dev/null 2>&1
    0 6 * * * /scripts/exim_tidydb > /dev/null 2>&1
    0 4 * * * /backup/backupcron
    
    However /scripts/upcp is being run at at 5:52am, /backup/backupcron is being run at 9:00am.

    I cannot understand this. I have run 'date' on the server shell and it shows the correct date/time.

    Does anyone have any ideas on what could be causing this ??

    Thanks in advance,
    Daniel
     
  2. cpanelinfoseeker

    cpanelinfoseeker Well-Known Member

    Joined:
    Oct 25, 2002
    Messages:
    325
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    NE Illinois
    cPanel Access Level:
    Root Administrator
    Server time and local time are probably not the same. From your example, it appears to be a 5 hour difference. The cron runs on the server time setting.

    Ron
     
  3. djblamire

    djblamire Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    253
    Likes Received:
    1
    Trophy Points:
    168
    What's the best way to check/correct this ?

    Thanks
    Daniel
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    22
    Trophy Points:
    463
    Location:
    Go on, have a guess
    If you've changed your timezone, date or time on the server you have to restart crond for it to take effect as vixie-cron doesn't take the change into account:

    service crond restart
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. djblamire

    djblamire Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    253
    Likes Received:
    1
    Trophy Points:
    168
    I haven't changed anything though yet...

    The timezone is already correct, and the date command shows the correct time....

    Any other ideas ?

    Thanks
    Daniel
     
  6. djblamire

    djblamire Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    253
    Likes Received:
    1
    Trophy Points:
    168
    Thanks! - Your command did indeed fix the problem :)
     
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