Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Mar 2004 17:38:01 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Brian Henning <b1henning@hotmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: crontab email
Message-ID:  <20040304173801.GA99258@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <BAY15-DAV4647LNeGgi00011e30@hotmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
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

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFAR2l5dtESqEQa7a0RAoXZAJ9Sj999s174bOyyjCHaU0eNWREC8QCcDf6D
bbXIcrdEr+gz7sq1dQVoo3I=
=HdM4
-----END PGP SIGNATURE-----
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040304173801.GA99258>