[ale] cron mail, how to STOP it.

James P. Kinney III jkinney at localnetsolutions.com
Sat Oct 15 07:29:17 EDT 2005


On Fri, 2005-10-14 at 20:58 -0400, Geoffrey wrote:
> Paul Cartwright wrote:
> > I created a cron entry to check my yahoo mail using yosucker. I HATE 
> > getting emailed every X hours to tell me it ran... I "thought" the 
> > correct way to stop the mailing of a cron job running was to add a 
> > 2>/dev/null at the end of the line.
> > here is the line I don't want mail from:
> > 10 3,6,9,12,15,18 * * * /home/pbc/bin/yosucker
> > 
> > 
> > suggestions?
> 
> 10 3,6,9,12,15,18 * * * /home/pbc/bin/yosucker >/dev/null 2</dev/null

This will send all output of the yosucker command to /dev/null.
The cron process _still_ has an automatic email built it that can only
be disabled by the aforementioned
MAILTO=""
line at the top.

Of course this brings up the obvious, "What if I want _some_ crons to
notify me and other to not waste my time?"
Tough cookies. It's an all or nothing deal. There are some other cron
beside the standard Vixie cron that might support that. I have not used
any of them. I use wrapper scripts that handle email notification for
those jobs I need notification of and turned off the cron notification
by default.
-- 
James P. Kinney III          \Changing the mobile computing world/
CEO & Director of Engineering \          one Linux user         /
Local Net Solutions,LLC        \           at a time.          /
770-493-8244                    \.___________________________./
http://www.localnetsolutions.com

GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
<jkinney at localnetsolutions.com>
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part




More information about the Ale mailing list