Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Patrick F. Ducharme on August 12, 2003, 01:07:17 AM
-
Hi,
I have a MS Access database in a Ibays called bdadmin. I created a sript as follow (Script is in /)
#!/bin/bash
rm /home/e-smith/files/ibays/bdadmin/files/bd.b1h -f
cp /home/e-smith/files/ibays/bdadmin/files/bd.mdb /home/e-smith/files/ibays/bdadmin/files/bd.b1h.
I set the permission to 755 for the script file. When I run it manually, everything is ok.
I want to run that script in a Crontab job every 30 minutes. I'ved do that:
logged as root,
crontab -e
I edited the cronlist like that:
30 * * * * ./backup.sh
saved.
When I do I crontab -l, the job is listed. But nothing run... What I'ved done bad ?
-
Try the full path to your script instead of the ./ Probably crond just can't find your script.
When testing a cronjob, it can be usefull to add the following line to the end of your script:
date | mail -s "Testing backup.sh" admin
This will send an e-mail to admin with the date & time. This way you'll know if and when the cronjob was executed.
Michiel
-
I had the same problem and changed my cron tab entry to include the entire path to the file. After that it ran as expected.