Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Des Dougan 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
-
* * * * * * 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
-
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
-
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