LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   Need to direct to >2&1 for cron? (https://www.linuxquestions.org/questions/solaris-opensolaris-20/need-to-direct-to-2-and-1-for-cron-813195/)

grob115 06-09-2010 01:33 PM

Need to direct to >2&1 for cron?
 
Heard that cron will generate an e-mail whenever it executes a line, and to prevent this, each cron line should have >2&1 appended at the end. Is this true?

AlucardZero 06-09-2010 02:48 PM

Mostly true; you need ">/dev/null 2>&1"

jlliagre 06-10-2010 07:32 AM

To clarify, cron only sends e-mails when the executed program is outputting something in either its stdout or stderr. These redirections are discarding these potential outputs.


All times are GMT -5. The time now is 04:16 AM.