Created a Cron job, now my inbox is getting flooded
A few days ago I created a cron job in my /etc/crontab file. This was the only modification made to the file. Ever since then, I recieve about 20 emails per day that look as follows:
Quote:
Quote:
|
Any output (on STDERR or STDOUT) from a cronjob gets emailed to you. What happening is cron is trying to run a command call root which is then failing. How have you been editing your crontab? With crontab -e? Typically each user has a crontab rather than a single large crontab that lists the users. What do you get when you run crontab -l (thats an lower case L by the way) as root?
cheers Jamie... |
It sounds like you have an error in the script that runs at the bottom and the output is causing cron to send you an email (as stated above).
Check the script and if you need to just put the about put to /dev/null. |
Quote:
Quote:
|
I recon you want to run crontab -e and remove just have 00 5 * * * /home/php/parse/my_script1 in your user specific crontab.
cheres Jamie... |
Quote:
|
crontab -e will allow you to edit the current user's crontab. This is typcially where you schedule things to run.
cheers Jamie... |
Quote:
|
Since you edited the system crontab wich is /etc/crontab
instead of 00 5 * * * /home/php/parse/my_script1 it should be 00 5 * * * root /home/php/parse/my_script1 |
Oh, man, from:
"/bin/bash: root: command not found" it really seems clear that you should erase the term 'root' inside the crontab: 01 * * * * root nice -n 19 run-parts /etc/cron.hourly Cron is trying to execute a command named "root", which of course, doesn't exist. Try: 01 * * * * nice -n 19 run-parts /etc/cron.hourly - On another matter of things, the execution of cron jobs always mails the user with the results, wherever it ends in success or not. If you want it disabled, you have to define a environment variable MAILTO and leave it empty. The easiest will be to add a line like this at the end of /etc/profile, or /root/.bashrc MAILTO=""; export MAILTO |
pablob:
TruckStuff has modified the system crontab! The correct syntax is to include the username (wich is ususally root) in each line. Your post applies to a user crontab! |
All times are GMT -5. The time now is 02:17 PM. |