persistent cron error
I get the following error for a cron job that runs ntpdate:
Date: Thu, 19 Feb 2004 06:26:42 -0800
From: Cron Daemon
Subject: Cron <root@dog> test -e /usr/sbin/anacron || run-parts --report
/etc/cron.daily
To: root
/etc/cron.daily/ntpdate:
run-parts: failed to exec /etc/cron.daily/ntpdate: Exec format error
run-parts: /etc/cron.daily/ntpdate exited with return code 1
The file format _looks_ ok to me, and the commands succeed when run
manually in the shell (including the if...then conditions).
Any suggestions?
/etc/cron.daily/ntpdate:
# cron script to run ntp client & sync clock.
#
# Run queue at 09:20
# m h dom mon dow user command
@reboot root \
if [ -x /usr/sbin/ntpdate ]; then \
/usr/sbin/ntpdate -s ntp.ucsd.edu ntp1.mainecoon.com; \
fi
20 9 * * * root \
if [ -x /usr/sbin/ntpdate ]; then \
/usr/sbin/ntpdate -s ntp.ucsd.edu ntp1.mainecoon.com; \
fi
# <verbose comments about the ntp servers truncated>
TIA, Paul
--
Paul Mackinney
paul@mackinney.net
Reply to: