i need some advice as i am being driven crazy by Cron on my Fedora 8 box.
i have a basic script that is stored in
Here is a copy of the code within that script.
#!/bin/bash AFolderName="archivefolder" AFileName="archive.zip" echo "setting variables" if [ -d $AFolderName ] then rm -r $AFolderName fi echo "checked if folder exists" mkdir $AFolderName cd $AFolderName echo "about to zip" zip -r $(date +%Y%m%d)_$AFileName /var/www/* echo "zipped" echo "about to s3" s3cmd put $(date +%Y%m%d)_$AFileName s3://mytestbucket echo "s3ed" cd .. rm -r $AFolderName echo "done"
i have done crontab -e and added a job according to the formatting for it, and the job appears to run as i get a log file in the temp folder. however there is nothing in the logfile and nothing gets uploaded to amazon...
here is whats in crontab
*/10 * * * * root /tmp/myscript.sh > /tmp/ms.log
what am i doing wrong? there is no hint anywhere to what the problem is. by the way the script HAS to run as root.