View topic - How do you stop cron entries from generating mail

Page 1 of 1

How do you stop cron entries from generating mail

PostPosted: Thu Jan 19, 2012 3:38 am
by jargoint
Hi,
I have a QNX 4.25 system and in cron I have a script that is generating an error and putting a message in the /usr/spool/mail/root file, and I do not want it to generate any mail.
Does anyone know how to turn configure the system so that errors generated by scrips in cron do not generate an email for root.

any assistance would be greatly appreciated.

Re: How do you stop cron entries from generating mail

PostPosted: Thu Jul 05, 2012 6:15 pm
by space
Add ">/dev/null 2>/dev/null" to the cron lines to throw away any output.
If you would prefer to keep the output
">/tmp/somefile.out 2>/tmp/somefile.err"
or
">>/tmp/somefile.out 2>>/tmp/somefile.err"