[lug] crontab messages

Michael J. Pedersen marvin at keepthetouch.org
Sun Feb 11 09:21:54 MST 2001


On Sun, Feb 11, 2001 at 08:39:23AM -0600, charles at lunarmedia.net wrote:
> i am running a cron job that is ending up mailing me a status after the
> job is finished. i know that there is a method to prevent this from
> happening, but i can't remember how to do it. i think there is some kind
> of redirect that i need to add in the crontab itself with a > that will do
> it.
> 
> does anyone know what i am talking about?

Yep, it's actually quite easy to do. Add this redirect at the end of the
command line in your crontab:

	>/dev/null 2>&1

And that will prevent any output from appearing. After that, cron will see
nothing, so email you nothing.

-- 
Michael J. Pedersen
My GnuPG KeyID: 4E724A60        My Public Key Available At: wwwkeys.pgp.net
My GnuPG Key Fingerprint: C31C 7E90 5992 9E5E 9A02 233D D8DD 985E 4E72 4A60
GnuPG available at http://www.gnupg.org



More information about the LUG mailing list