[Klug-general] Cron job

Nathan Friend nathan.friend at gmail.com
Thu Apr 9 14:00:17 UTC 2009


Afternoon All,
I've writen a simple script to dump a database and would like it to run as a
cron job.  How should I set the script permisisons?

dbbackup.sh contains:

NOW=$(date +"%d-%b-%y"_"%l:%M")
FILENAME="moodle_db_backup_$NOW.sql"
mysqldump -uuser -ppassword databasename > /dbbck/$FILENAME

The cron entry is

30 20 * * * /usr/local/script/dbbackup.sh

I can run the script from for command line OK with the expected output.
However wathcing /var/log/messages I see the cron job run but no output
file...

Cheers,

Nathan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/kent/attachments/20090409/7fb9410c/attachment.htm 


More information about the Kent mailing list