time/date sync and hwclock

Bill Day bill
Mon May 17 11:29:57 PDT 2004


Im not following the path issue...?

When the job is ran from a term, no matter what directory Im in, its fine, 
ran using Webmin -> Sheduled Cron Jobs -> (Select the job) -> "Run now" it 
runs fine, but if CRON runs it over night I get the hwclock command not 
found...

The job is set to run as root.

Thanks for the help.

On Tuesday 16 April 2002 08:41, you were heard blurting out:
> 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,

-- 
  Bill Day 
  
  Linux for Windows Addicts:
  A Twelve Step Program for Habitual Windows Users.
  ISBN: 0072130814
  
  Get it cause Ol' Billy Gates don't want you too!
  
  8:30am  up 20 days, 13:09,  3 users,  load average: 0.05, 0.18, 0.30



More information about the Linux-users mailing list