Am 25.02.2013 21:39, schrieb Joseph: > I'm updating clock via bash script. When I run it from a command line, > it works just fine but when I try to run it via crontab I get: > > /home/thelma/business/programs/time_date_setting_script.sh: line 3: > hwclock: command not found > > here the script: > #!/bin/sh > rdate -s 128.138.140.44 > hwclock --systohc > > and crontab entry: > 45 12 * * 1 sh /home/thelma/business/programs/time_date_setting_script.sh > > When I run the scrip manually or just the command: "hwclock --systohc" > it is working OK; why isn't it working from the crontab? >
I've noticed that cron doesn't have /sbin and /usr/sbin in PATH. Try using the absolute path to hwclock. Regards, Florian Philipp
signature.asc
Description: OpenPGP digital signature