Hi all,
I have difficulties setting up a cron job. This is the relevant piece of my crontab:
I've set it to run every 5 minutes, and every 5 minutes, I get an email.. So I know it runs. When I tail /var/log/cron, it shows that it's successful:
However.. that's where it ends - nothing happens! The script is supposed to upload some files through FTP, and it doesn't do that. WHen I run the same exact command (bash /path/to/script.sh) from the command line, it executes the script and everything is cool...
I tried redirecting the output from the script to a local file - nothing happens. I've set the permissions for the script and all the files in the folder to 777, still no result ...
I'm at loss, don't even know where to look for further debugging.. Any ideas?
I have difficulties setting up a cron job. This is the relevant piece of my crontab:
Code:
*/5 * * * * root bash /path/to/script.sh | mail -s SUCCESS my_email
I've set it to run every 5 minutes, and every 5 minutes, I get an email.. So I know it runs. When I tail /var/log/cron, it shows that it's successful:
Code:
Nov 12 07:35:01 gc /usr/sbin/cron[76657]: (root) CMD (bash /path/to/script.sh | mail -s SUCCESS my_email)
However.. that's where it ends - nothing happens! The script is supposed to upload some files through FTP, and it doesn't do that. WHen I run the same exact command (bash /path/to/script.sh) from the command line, it executes the script and everything is cool...
I tried redirecting the output from the script to a local file - nothing happens. I've set the permissions for the script and all the files in the folder to 777, still no result ...
I'm at loss, don't even know where to look for further debugging.. Any ideas?