Problem with cronjob
Hello,
if I execute a shell-script over the command shell with ./backup.sh it works fine. If I create a cronjob with contab -e 0 23 * * 0,1,2,3,4,5 /backup.sh then the shell script doesn't work. The shell script begins to start at 11pm and hang up. Where is the problem? In the shell script I use abolute paths. Can you help me? Arndt |
Hi,
This command: ./backup.sh tells me that the backup.sh script is not to be found in the PATH variable. Cron (which one are you actually using?) has an even more limited PATH (if any). 0 23 * * 0,1,2,3,4,5 /backup.sh Should be: 0 23 * * 0,1,2,3,4,5 cd /path/to/program ; ./backup.sh or 0 23 * * 0,1,2,3,4,5 /full/path/to/backup.sh Hope this helps. |
All times are GMT -5. The time now is 09:33 AM. |