Click to See Complete Forum and Search --> : cron won't stop mailing me!
James Decker
08-12-2001, 02:08 AM
Hi.
I've set up a cron job to send my zoneedit.com ip updates every half hour.
The thing is that it sends back some html that cron is sending back to my root user mail.
So in other words I'm getting about 48 e-mails a day that I have to delete.
Is there anyway to stop cron from sending a e-mail to me?
Thanks,
-james
Malakin
08-12-2001, 03:09 AM
give it a bogus return address :)
James Decker
08-12-2001, 08:40 AM
I've actually just been using webmin to set the cron jobs up.
How would I do this exactly from the command line?
-james
dvdnut
08-12-2001, 09:14 AM
how did you set it up in the first place?
if you know or remember then go back there and edit the cron job
/bin/your_command 1> /dev/null 2> /dev/null
note there is no space between the 1(2) and the >
put this after your command on every line in your crontab file, get there by editing it in your favorite editor (VI!) or by 'crontab -e'.
the command sends output and then error output to /dev/null, so if you want to be notified of errors, omit the 2>...
there you go
danrees
08-12-2001, 01:46 PM
I'm 99% sure that you can also put MAILTO="" in before your cron job:
e.g.
MAILTO=""
*/15 * * * * /usr/bin/batch1
MAILTO=""
* 10-22/1 * * /usr/bin/batch2
What does the email acually say? Most of the time you'll get an email from cron simply because the cronjob you setup is *wrong* and it's warning you about it. Just a thought.
James Decker
08-12-2001, 11:29 PM
Hi.
This is the command I am using -
wget -O - --http-user=***** --http-passwd=***** 'http://dynamic.zoneedit.com/auth/dynamic.html?host=mysites....'
Then I get a message saying that no update is needed since my ip has not yet changed.
I set it up in Webmin using my normal user, not root.
?
-james