Koozali.org: home of the SME Server

Cron output question

Des Dougan

Cron output question
« on: August 19, 2002, 10:51:01 AM »
I've set up a custom template in cron.d for a job that will run hourly. Is there any way to stop this particular job's output from being mailed to root? I don't want it to be mailed at all, in fact, as I'm not interested in seeing it. I do want to continue to see the output from other daily and weekly jobs.

Thanks,

Des Dougan

Chris

Re: Cron output question
« Reply #1 on: August 19, 2002, 05:42:17 PM »
* * * * * * mycommand >> /home/user/cron.log 2>&1

will log stdout and stderr to to /home/user/cron.log Des Dougan wrote:
>
> I've set up a custom template in cron.d for a job that will
> run hourly. Is there any way to stop this particular job's
> output from being mailed to root? I don't want it to be
> mailed at all, in fact, as I'm not interested in seeing it. I
> do want to continue to see the output from other daily and
> weekly jobs.
>
> Thanks,
>
> Des Dougan

Darrell May

Re: Cron output question
« Reply #2 on: August 20, 2002, 04:33:16 AM »
or since Des stated:

> in fact, as I'm not interested in seeing it.

you can do this and not even bother to log the output at all:

* * * * * * mycommand > /dev/null 2>&1

Darrell

Des Dougan

Re: Cron output question
« Reply #3 on: August 20, 2002, 08:29:29 AM »
Chris and Darrell, thanks.

I was on the right track, but I found I had to enclose the command (a wget command with parameters)  in quotes to get it to work properly.

Des