Re: Crontab logs

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Matt Graham
Date:  
To: Main PLUG discussion list
Subject: Re: Crontab logs
>> On 7/21/2015 3:28 PM, Keith Smith wrote:
>>> Any idea why the error was not written to /var/log/cron ?
> On 2015-07-21 19:14, George Toft wrote:
>> Probably because it went into the mail?

On 2015-07-21 19:45, Keith Smith wrote:
> I'm not following. What are you saying?


When a cron job runs, the default behavior of the cron daemon is to
take that cron job's stdout and stderr and mail those things to the user
who ran the job. This is why many regular cron jobs have "> /dev/null"
in their crontab after they've been debugged. If you want the output of
cron jobs to be written to syslog, on CentOS 6, you'd modify
/etc/sysconfig/crond and add -s to the CRONDARGS variable and restart
crond.

--
Crow202 Blog: http://crow202.org/wordpress
There is no Darkness in Eternity
But only Light too dim for us to see.
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss