Linux – cron clock problem

crondatelinuxrhel5

I have noticed on my RHEL 5.5 that cron daily starts an hour later (at 1AM instead of midnight). System and hardware clock are the same. How can i set it so it will start at midnight?

date

[root@a ~]# date
Wed Mar  9 12:44:35 EST 2011

hwclock

[root@a ~]# /sbin/hwclock -r
Wed 09 Mar 2011 12:44:42 PM EST  -0.000484 seconds

crontab

0 0 * * *    /usr/sbin/ntpdate pool.ntp.org >/dev/null 2>&1

cron log

Mar  7 01:00:01 host crond[30420]: (root) CMD (/usr/sbin/ntpdate pool.ntp.org >/dev/null 2>&1)

clock

[root@a ~]# cat /etc/sysconfig/clock
ZONE="America/New York"
UTC=true
ARC=false

Best Answer

Have you changed the system timezone setting? If so, did you restart the crond service afterwards?

Regardless, I would restart the cron deamon, to make sure it's using the correct timezone.

# /sbin/service crond restart