LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   cron mail help (https://www.linuxquestions.org/questions/linux-general-1/cron-mail-help-52597/)

joesbox 03-30-2003 09:26 PM

cron mail help
 
i have read thru the forum and tried to understand the command at the end of the cron command but i am at a loss. i have seen something close to bla/bla/bla > /dev/null some have a one or a two or both or none and i am not sure what is right. can someone help explain what this all is??? <man cron> was no help and neither was <cron --help> nor <info cron>

fsbooks 03-30-2003 10:20 PM

Is this what you mean?

11 0 1 * * /var/spool/cron/UM/cleanlogs 4000 1>/dev/null 2>/dev/null


The 1>/dev/null redirects stdout to /dev/null
The 2>/dev/null redirects stderr to /dev/null

Otherwise these are mailed to the owner of the cronjob. The use of them is simply to avoid potentially unecessary mail messages.

Note that redirection is actually part of the bash shell, so do a "man bash" to find out more.


All times are GMT -5. The time now is 04:22 PM.