Koozali.org: home of the SME Server

CRON Job not running... !?

Patrick F. Ducharme

CRON Job not running... !?
« 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 ?

Michiel

Re: CRON Job not running... !?
« Reply #1 on: August 12, 2003, 01:44:02 AM »
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

Greg Allt

Re: CRON Job not running... !?
« Reply #2 on: August 20, 2003, 05:41:03 AM »
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.