Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Operating System - Tru64 Unix
cancel
Showing results for 
Search instead for 
Did you mean: 

Cron didn't work

SOLVED
Go to solution
Nickolay
Occasional Advisor

Cron didn't work

When system date changing cront stop working!
I see that process /usr/sbin/cron running, but jobs didn't starts.
When I stop cron (by kill command) and then start it, it works and jobs starts.

It happens periodicaly. Some times when date change cron continue works fine, but sometimes it stop working.
5 REPLIES
Eric van Dijken
Trusted Contributor

Re: Cron didn't work

Does it stop working or is it just waiting for the next time it was scheduled to run?

If you turn back time for 1 hour, cron will wait that hour before it does anything again.

If this really bothers you, just restart cron everytime you change your system date. Or better yet. Stop cron. Reset your system time, than start cron again.
Watch, Think and Tinker.
Nickolay
Occasional Advisor

Re: Cron didn't work

Cron stop working. All jobs not starts about 20 hours :(
It start to work only when I kill the process, and then start it.
Stuart Whitby
Trusted Contributor
Solution

Re: Cron didn't work

truss is available on one of the extra CDs that comes with Tru64 - can't remember which one (system diagnostics?). Get a hold of lsof as well (vic.cc.purdue.edu/pub/tools/lsof, I think). Use truss to look into what system call cron is hung in and lsof to identify what it's waiting for (if it's stuck in a read/write or whatever). If it's waiting on another process, go see what that other process is doing.

It's also possible to set up a script that way which .............. ahh, might be a problem with the suggestion to run a script from cron which would monitor whether cron's running or not....

*slaps head in disgust.
A sysadmin should never cross his fingers in the hope commands will work. Makes for a lot of mistakes while typing.
Michael Schulte zur Sur
Honored Contributor

Re: Cron didn't work

Hi,

have you had a look into
/var/adm/cron/log
?

greetings,

Michael
Nickolay
Occasional Advisor

Re: Cron didn't work

Yes, I look /var/adm/cron/log. Last record about started job was before system date change.