[NTLUG:Discuss] ntpdate -vs- cron
Bug Hunter
bughuntr at one.ctelcom.net
Fri Oct 27 11:26:47 CDT 2000
hmm. Try embedding it in a script file and running it that way. It may
be some environment variables aren't getting set when run as a cron job.
BTW, I don't need microsecond accuracy, and run the following:
rdate -s clock.psu.edu
hwclock --systohc
once a day. that prevents me from tickling psu's clock too much (and
being cut off), and sets the hardware accordingly so the next time I
reboot, I'm still correct.
On Fri, 27 Oct 2000, Egome wrote:
> I do not know why these two programs have SUCH a difficult time working
> together on my Slackware 7.1 server!
>
> If I execute /usr/sbin/ntpdate time.nist.gov from the command line,
> everything works beautifully!
>
> If I try to make a cron job of that command line I get the following error
> message emailed to root..
>
> ntpdate[3103]: the NTP socket is in use, exiting
>
>
> I've tried sending the output to /dev/null, ( /usr/sbin/ntpdate
> time.nist.gov >> /var/log/ntpdate.log > /dev/null ) but it still get's
> emailed to me.
>
> Why does the command work from the command line but not as a cron job?
More information about the Discuss
mailing list