[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Silent Cron Jobs

On 3/26/08, Curt Howland <Howland@priss.com> wrote:

> I tried to whip up a small cron job, I put a short script
> in /etc/cron.daily thinking that this would work.
> Well, yes, it works, but I get mail sent to me by cron explaining that
> the job executed successfully.

That's odd, usually cron only sends mail if the job failed or there
was output.  Is there output?  Even if it's a single space or a blank

> I'd prefer not to get the mail. I don't get mail for any of the other
> jobs in cron.daily, and I don't understand enough of bash scripting
> to see how mine is different from the others.

You can always dump the output to /dev/null.  In case you don't know:
| command_here >/dev/null 2>&1

This has the disadvantage that legitimate messages may be discarded.  Your call.


Reply to: