Operating System - Tru64 Unix
1752777 Members
6466 Online
108789 Solutions
New Discussion юеВ

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 5
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.