The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cron job not running on a Monday but runs Wed & Frid

Discussion in 'General Discussion' started by donna o, Aug 5, 2014.

  1. donna o

    donna o Registered

    Joined:
    Aug 5, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi I have a cron job set to run Mon, Wed and Frid at 7:30am via cPanel

    30 7 * * 1,3,5 /usr/bin/curl -s -L 'http://our specific command' > /dev/null

    but for some reason the job doesn't seem to run at all on a Monday but it does on a Wed and a Friday.

    Have checked /var/log/cron and the cron job seems to have run and we are not receiving an error email.

    I can get the job to run from the browser on a Monday although I haven't tried it at 7:30am.

    I am new to trying to locate errors with Cron jobs.

    Any thoughts?

    CentOS 6.5 cPanel x64 v11.44.1 (build 7)
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,145
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    If your cron is working fine on a Wed and a Friday then there is no issues with your cron setup, I think there was an issue with the crond service at Monday and due to that you faced this issues. I will suggest you monitor your server cron logs at Monday if you are getting same issues with the Monday cron
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,675
    Likes Received:
    647
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You can also enable monitoring for the "crond" service to ensure it restarts automatically in the event it fails:

    "WHM Home » Service Configuration » Service Manager"

    If the log shows the cron job ran at the specified time, then it likely ran and the script might not have completed the action it was configured to.

    Thank you.
     
  4. donna o

    donna o Registered

    Joined:
    Aug 5, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks Michael and 24x7server - I have done this now and will see what happens on Monday. Its not a critical job and I can initiate it from the browser.

    I'll let you know what happens.

    Cheers D
     
  5. donna o

    donna o Registered

    Joined:
    Aug 5, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi Michael and 24x7

    I enabled monitoring for the "crond" service but still the cron job didn't run on Monday at 7:30am. I had also scheduled for 10am and this one did run (but 10am is a little late for this job to run).

    Which logs should I be checking to ensure the job is running? Is there something else I can do?

    Thanks for your help
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,675
    Likes Received:
    647
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Check /var/log/cron to ensure the cron job ran. If it did, the issue is not with the cron job but with your script. You may need to check with the developers of the script to determine why it does not run as intended at specific times.

    Thank you.
     
Loading...

Share This Page