CRONTAB Question

Jason Dixon jason at dixongroup.net
Thu Jun 30 22:53:17 UTC 2005


On Jun 30, 2005, at 6:40 PM, Kelley.Coleman at med.va.gov wrote:

> I have several entries in a crontab.  All create an e-mail to the user
> account and I want that on all but one.  The one job runs every 10 
> minutes
> with output to a log.  I'm getting lots of e-mails over the course of 
> a day.
> What syntax is needed to prevent the e-mail on that one entry?

0	*	*	*	*	/path/to/some/command 1>/dev/null

The redirection of stdout (1) to /dev/null is the important part.  
You'll still get any errors reported to stderr (2) emailed to the user 
in case of problems.  Of course, that assumes that the job writes to 
the log internally, not by piping stdout through logger or some other 
similar mechanism.

--
Jason Dixon
DixonGroup Consulting
http://www.dixongroup.net





More information about the redhat-list mailing list