cron often has problems with the environment, it might not know about
your PATH. give it the full path to ntpdate.
BTW ntpdate is deprecated and is to be removed from the ntp packeage.
see man ntpdate, viz:
" ntpdate - set the date and time via NTP
Disclaimer: The functionality of this program is now available in the
ntpd program. See the -q command line option in the ntpd - Network
Time Protocol (NTP) daemon page. After a suitable period of mourning,
the ntpdate program is to be retired from this distribution"
On Mon, 06 Oct 2003 09:33:15 +1300
Jim Cheetham <[EMAIL PROTECTED]> wrote:
> On Mon, 2003-10-06 at 09:22, Andrew Errington wrote:
> > 10 3 * * * ntpdate ntp.public.otago.ac.nz
> > 10 3 * * * touch ~ame/rootwashere
>
> > So, cron seems to be working and doing stuff at 03:10. ntpdate works from
> > the command line. Why does ntpdate from root's crontab not appear to work?
>
> I don't see anything obvious ... however, you should probably try to get
> some debug output from ntpdate.
>
> Try
>
> */5 * * * * ntpdate -d ntp.public.otago.ac.nz && touch ~ame/rootwashere
>
> which will kick off every 5 minutes, produce copious output that might
> get emailed to root and thence yourself, and only touch the status file
> if the ntpdate command worked ...
>
> -jim
>
--
Nick Rout <[EMAIL PROTECTED]>