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

donna o

Member
Aug 5, 2014
5
0
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)
 

24x7server

Well-Known Member
Apr 17, 2013
1,913
99
78
India
cPanel Access Level
Root Administrator
Twitter
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,254
463
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.
 

donna o

Member
Aug 5, 2014
5
0
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
 

donna o

Member
Aug 5, 2014
5
0
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,254
463
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.