I'm trying to have a daily cron update the clock on my 12.04 server. I've followed the instructions here, but it still doesn't run: After a few weeks, the clock once again is off by a few seconds. I've been Googling around for solutions, but nothing seems to help. From what I've found on Google, I've verified the following:
Running the script manually works fine:
root@...:~# /etc/cron.daily/ntpdate 13 May 14:42:22 ntpdate: adjust time server 220.127.116.11 offset -0.018984 sec
The script is executable:
root@...:~# ls -l /etc/cron.daily/ total 60 .... -rwxr-xr-x 1 root root 46 May 12 20:41 ntpdate ....
I don't see any cron-related errors in the syslog.
May 13 06:25:01 ... CRON: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ))
I've used an absolute path, just in case the cron PATH was missing it:
/usr/sbin/ntpdate ntp.ubuntu.com pool.ntp.org
I've done a dry run:
root@...:~# run-parts --test /etc/cron.daily ... /etc/cron.daily/ntpdate ...
I can't see any reason why it wouldn't be working.