crontab email

Matthew Seaman m.seaman at infracaninophile.co.uk
Thu Mar 4 09:38:07 PST 2004


On Thu, Mar 04, 2004 at 10:56:55AM -0600, Brian Henning wrote:

> Everytime something runs from the the crontab for a given user such as root, I
> get an email with the results of the execution. I am running a few crontabs that
> run every 2 minutes and this gets to be a lot of excess email. How can I turn
> off this feature.

Either set the MAILTO variable at the top of the crontab file to an
empty string, or redirect stdout and stderr from each of the commands
to /dev/null -- something like:

   5 * * * * yourcommandhere >/dev/null 2>&1

See crontab(5) for details of MAILTO and sh(1) for how to redirect the
file descriptors.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040304/43c43b5b/attachment.bin


More information about the freebsd-questions mailing list