At 02:55 PM 3/6/03, you wrote:
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.

"> /dev/null" only transfers standard out to /dev/null but not standard error. If you are still getting messages then they are being sent to standard error.

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...

"> /dev/null 2>&1" is actually 2 separate actions "> /dev/null" & "2>&1". The first as mentioned just transfers standard out to /dev/null. The second tells bash to transfer standard error "2" to standard out "1" and since standard out is going to /dev/null so is standard error.


--
Mark Lane, CET  mailto:[EMAIL PROTECTED]
Hard Data Ltd.  http://www.harddata.com
T: 01-780-456-9771      F: 01-780-456-9772
11060 - 166 Avenue Edmonton, AB, Canada, T5X 1Y3
--> Ask me about our Excellent 1U Systems! <--




BEGIN:VCARD
VERSION:2.1
N:Lane;Mark
FN:Mark Lane
ORG:Hard Data Ltd.
TITLE:Sales
TEL;WORK;BUSINESS:780-456-9771
TEL;WORK;VOICE:780-456-9771
TEL;WORK;FAX:780-456-9772
ADR;WORK:;;11060 - 166 Avenue;Edmonton;AB;T5X1Y3;Canada
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:11060-166 Avenue=0D=0AEdmonton, AB T5X1Y3=0D=0ACanada
URL;WORK:http://www.harddata.com
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20010222T231737Z
END:VCARD

Reply via email to