[gentoo-user] hwclock: command not found
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? -- Joseph
Re: [gentoo-user] hwclock: command not found
On Mon, 25 Feb 2013, Joseph wrote: 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 Could it be that cron doesn't have this command on its PATH? Might be best to put the full path to hwclock instead of just hwclock. -- R
Re: [gentoo-user] hwclock: command not found
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
Re: [gentoo-user] hwclock: command not found
On 02/25/13 15:44, Randy Barlow wrote: On Mon, 25 Feb 2013, Joseph wrote: 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 Could it be that cron doesn't have this command on its PATH? Might be best to put the full path to hwclock instead of just hwclock. -- R That was it, thank you. -- Joseph