OESF Portables Forum

Everything Else => General Support and Discussion => Zaurus General Forums => Archived Forums => Software => Topic started by: bam on December 31, 2005, 11:47:06 pm

Title: Cron & Ntpdate/rdate
Post by: bam on December 31, 2005, 11:47:06 pm
so if cron runs as root, I can have it run a ntpdate/rdate job. Theoretically

I have this
*/5 * * * * root /usr/bin/rdate -s 132.163.4.102
also tried
*/5 * * * * root /usr/bin/ntpdate 132.163.4.102

in my crontab, and it installs correctly, the /var/cron/log shows its running and what its running, so why isnt my date adjusting as it should? Any ideas, Its gotta be something small I am missing.
Title: Cron & Ntpdate/rdate
Post by: speculatrix on January 01, 2006, 12:05:32 pm
Quote
so if cron runs as root, I can have it run a ntpdate/rdate job. Theoretically

I have this
*/5 * * * * root /usr/bin/rdate -s 132.163.4.102
also tried
*/5 * * * * root /usr/bin/ntpdate 132.163.4.102

in my crontab, and it installs correctly, the /var/cron/log shows its running and what its running, so why isnt my date adjusting as it should? Any ideas, Its gotta be something small I am missing.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=109063\"][{POST_SNAPBACK}][/a][/div]

that isn't necessarily the right format for cron. try

*/5 * * * * /usr/bin/ntpdate 132.163.4.102 > /var/log/ntpdate.cron.log 2>&1

and see what you see in /var/log/ntpdate.cron.log when it runs.

might be worth writing a script to try "ping" before doing the ntpdate to verify the network is up.