In article <[EMAIL PROTECTED]>,
Karl Ferguson <[EMAIL PROTECTED]> wrote:
>> Just a quick question!!
>> 
>> How can I stop cron sending a message root everytime it runs a script. I 
>> have a couple of cron jobs that run every 15 minutes and I am getting 
>> hundreds of messages a day.
>> 
>> Thanks in advance.
>> 
>> Andrew
>
>In the /etc/crontab whack a "2>&1 > /dev/null" on the end of it.  Works
>here anyway :-)

If you really want to suppress stderr output, you'll want to use
">/dev/null 2>&1" (the other way around).

The "2>&1 > /dev/null" connected stdout to /dev/null and stderr
to the _original_ stdout. What happens now is that all normal
output from a script will be sent to /dev/null, and the stderr
output (probably real errors) will be mailed.

Hmm. Not so bad. That's probably just what you want. But I
think the 2>&1 is superfluous.

Mike.
--
+ Miquel van Smoorenburg   + Cistron Internet Services +  Living is a     |
| [EMAIL PROTECTED] (SP6) | Independent Dutch ISP     |   horizontal     |
+ [EMAIL PROTECTED]   + http://www.cistron.nl/    +      fall        +

Reply via email to