The details are in the Bash man pages, but here's the quick 'n' dirty:
 
-standard input: 0
-standard output: 1
-standard error: 2
 
So, in this case 2>&1 redirects the standard error, as well as the standard output, to /dev/null, which means that EVERYTHING is being shredded.
 
This might seem silly, but perhaps there are spaces in the crontab entry where there should be no spaces?  I don't know much about crontab, so I may be way off here.  But I guess it boils down to a question of syntax?
 
I don't think log files are ever irrelevant, but then I like documentation.  ;-)
 
HTH,
Curtis.
 
 -----Original Message-----
From: Kevin Anderson [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 06, 2003 2:55 PM
To: [EMAIL PROTECTED]
Subject: (clug-talk) Crontab logging

I have a cronjob that's giving me action.
 
I have a job schedules, and it's successfully running every 5 mins.  This creates a mountain of log files which I'd like to ignore, because they are irrelevant.  The job just checks a mail queue, and retries anything that might be stalled for any reason.
 
Anyway, I appended "> /dev/null" onto the end of the line in the crontab, but it's still giving me the output.  I know that it shouldn't, I've used this before.
 
Does anyone have any suggestions?  I've seen a few people appending "> /dev/null 2>&1" but since I'm not too sure what this does, I'm wondering if it could be explained...
 
Thoughts or suggestions appreciated.
 
Thanks
Kev.

Reply via email to