time/date sync and hwclock

Net Llama! netllama
Mon May 17 11:29:56 PDT 2004


Bill, this is almost definitely a $PATH issue.  You might want to add
something like:
export PATH=$PATH:/bin

to your script.

On Tue, 16 Apr 2002, Bill Day wrote:
> This is morning message from CRON:
>
> Subject: Cron <root at linuxbox> rdate -p -s clock-1.cs.cmu.edu && hwclock
> --systohc
>
> [clock-1.cs.cmu.edu]    Tue Apr 16 04:59:42 2002
> /bin/sh: hwclock: command not found
>
> I have checked that hwclock does work.  I am running the command (at one
> point a script) as root to sync the system time with the closest best ping
> time timeserver and for the life of me I cannot get the script to finish
> successfully and update the hardware clock as well.
>
> Below is the script I was using before just the command line, neither seem to
> work.  Any Ideas?
>
> The one that mimics the SxS:
>
> if rdate -s clock-1.cs.cmu.edu; then
>    hwclock --systohc
> fi
>
> The one someone else told me to try:
> rdate -s clock-1.cs.cmu.edu && hwclock --systohc
>
> As you can see running it in a term gives me no errors:
> [root at linuxbox /root]# hwclock
> Tue Apr 16 08:19:23 2002  -0.903347 seconds
> [root at linuxbox /root]# hwclock --systohc
> [root at linuxbox /root]#
>
> I canset my time to some ungoddly months days and hours
> off and as soon as I run the script my system time is correct but my hwclock,
> from cron gives command not found.
>
> TIA,
>
>

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lonni J Friedman				netllama at linux-sxs.org
Linux Step-by-step			     http://netllama.ipfox.com




More information about the Linux-users mailing list