Operating System - HP-UX
1834571 Members
3128 Online
110069 Solutions
New Discussion

cron job and backward system time

 
SOLVED
Go to solution
Manoj_20
Occasional Advisor

cron job and backward system time


Hello Masters

I have resetted my system date backward for one month.

I don't know whether this caused cron not to perform the cron job in scheduled time.

There is a cron job scheduled at 8.00 AM but that job was performed at 2.30PM instead of 8.00AM.

Did anybody encountered with same kind of problem?

Is it necessary to restart cron daemon if the system date modified backward?

awaitng for your valuable advice..

Thanks in advance

Manoj
5 REPLIES 5
T G Manikandan
Honored Contributor
Solution

Re: cron job and backward system time

YES

restart the cron daemon


Thanks
V.Tamilvanan
Honored Contributor

Re: cron job and backward system time

Hi,
You need to do

#/sbin/init.d/cron stop
#/sbin/init.d/cron start

Then only the cron daemon gets updated the current time.
Michael Tully
Honored Contributor

Re: cron job and backward system time

You would be better to actually reboot your system with the new date/time as there are other background daemons other than cron that use the system clock. To reset cron on it's own:

# /sbin/init.d/cron stop
# /sbin/init.d/cron start
Anyone for a Mutiny ?
John Adonis
Occasional Advisor

Re: cron job and backward system time

Hi Manoj,

You have to restart the cron daemon if the date is changed by command. If the date is changed by SAM this is not required.
T G Manikandan
Honored Contributor

Re: cron job and backward system time

Make sure that the daemon is not running after a
/sbin/init.d/cron stop

#ps -ef|grep cron

Else do a
kill -9


Thanks