Operating System - HP-UX
1836992 Members
1931 Online
110111 Solutions
New Discussion

Cron - some jobs do not run

 
Rob Fisher
Advisor

Cron - some jobs do not run

On one server, less then a day after a reboot, the jobs in the crontab of two users did not execute. I checked the syslog for any errors and my E-mail for anything that was kicked out from cron but I did not see any errors that would indicate the jobs themselves failed.

Those jobs also have the error messages redirected to output logs and those logs had not been touched since before the jobs were suppose to have started.

Has anyone seen this before?
May the winds of life keep you on the right tack
7 REPLIES 7
Ken Hubnik_2
Honored Contributor

Re: Cron - some jobs do not run

Check the cron log file for errors.
/var/adm/cron/log
Check the cron.allow and cron.deny files.
Check the crontab files for those users.
/var/spool/cron/crontabs
Chris Vail
Honored Contributor

Re: Cron - some jobs do not run

Check that only a single instance of cron is running. Multiple cron's can get very wierd.



Chris
Brian Bergstrand
Honored Contributor

Re: Cron - some jobs do not run

As already suggested, check the cron log file (not syslog). Also, cron e-mails output of jobs to the user who the job is running as, not root; so have your users check their local mail (unless there are aliases setup).
James R. Ferguson
Acclaimed Contributor

Re: Cron - some jobs do not run

Hi Rob:

My first guess, given the information provided, is that your reboot simply spanned the period during which your crontask's sould have run (but 'cron' didn't/wasn't); *or* a forced time change occured on the server such that 'cron' "thought" that the time to start your processes had past.

Regards!

...JRF...
Jeff Schussele
Honored Contributor

Re: Cron - some jobs do not run

Hi Rob,

What happens when you try to run the commands manually as those users?
Have you checked the /var/adm/cron/log file?
It contains all timestamps regardless of success or failure.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Rob Fisher
Advisor

Re: Cron - some jobs do not run

I'm sorry I forgot to specify that the cron log files are recycled by a monitoring group that we have. I have also asked the users if the received any E-mail, but they have not.

I did just check to see if there are two instinces of cron running but currently there is only one.

Thank you all for your quick responces. Please let me know if there are any other suggestions.
May the winds of life keep you on the right tack
Pete Randall
Outstanding Contributor

Re: Cron - some jobs do not run

Rob,

Without the log files, it's going to be hard to tell much of anything. Can you get your monitoring group to either not recycle the log files or save a copy so you can look at them the next time this happens?


Pete


Pete