mandrake_alf Posted December 25, 2003 Report Share Posted December 25, 2003 Hi all.. Created a script using animail (a fetchmail like app) that checks all my internet mail accounts and brings the messages to my local system. I set it up in cron to run every hour of every day at 15 minute intervals (ie: 1:00, 1:15 etc..) Problem is, every 15 minutes of every hour of every day of the year, I get a crom mail message notifying me the script has run. YIKES... thats 96 crom msgs a day (assuming I leave machine on 24/7) I've spent the last couple of hours or so looking at man cron, searching for a cron.config file, but no luck.. Surely there must be some way to turn this off.. I can't imagine someone setting up a cron job that runs every 5 minutes or so.. WOW.. 288 notification messages a day.. (and that would be for just one task) Any ideas on this one? TIA Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted December 26, 2003 Report Share Posted December 26, 2003 Try adding this: &>/dev/null to the end of your command. Quote Link to comment Share on other sites More sharing options...
mandrake_alf Posted December 26, 2003 Author Report Share Posted December 26, 2003 good idea... have to go out for a while now but will definately give it a try when I get back.. Will post results... Quote Link to comment Share on other sites More sharing options...
mandrake_alf Posted December 27, 2003 Author Report Share Posted December 27, 2003 Thanks Steve.. that was it... I suppose if I took those two 'echo' statements out that i used to validate the script running that might do the trici too. Thanks for the cron lesson.. Mike.. Quote Link to comment Share on other sites More sharing options...
aru Posted December 30, 2003 Report Share Posted December 30, 2003 Another approach: quoting "man 5 crontab": In addition to LOGNAME, HOME, and SHELL, cron(8) will look at MAILTO if it has any reason to send mail as a result of running commands in ``this'' crontab. If MAILTO is defined (and non-empty), mail is sent to the user so named. If MAILTO is defined but empty (MAILTO=""), no mail will be sent. Otherwise mail is sent to the owner of the crontab. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.