1 |
Am 25.02.2013 21:39, schrieb Joseph: |
2 |
> I'm updating clock via bash script. When I run it from a command line, |
3 |
> it works just fine but when I try to run it via crontab I get: |
4 |
> |
5 |
> /home/thelma/business/programs/time_date_setting_script.sh: line 3: |
6 |
> hwclock: command not found |
7 |
> |
8 |
> here the script: |
9 |
> #!/bin/sh |
10 |
> rdate -s 128.138.140.44 |
11 |
> hwclock --systohc |
12 |
> |
13 |
> and crontab entry: |
14 |
> 45 12 * * 1 sh /home/thelma/business/programs/time_date_setting_script.sh |
15 |
> |
16 |
> When I run the scrip manually or just the command: "hwclock --systohc" |
17 |
> it is working OK; why isn't it working from the crontab? |
18 |
> |
19 |
|
20 |
I've noticed that cron doesn't have /sbin and /usr/sbin in PATH. Try |
21 |
using the absolute path to hwclock. |
22 |
|
23 |
Regards, |
24 |
Florian Philipp |