Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the STDOUT and STDERR output of a crontab job

Tags:

linux

cron

centos

Does any body know where is the STDOUT and STDERR of a normal crontab job output in CentOS?

I checked the /var/log/cron file, but it only record the time and command of a cron job executed, no STDOUT or STDERR content found there.

like image 892
zJay Avatar asked Jan 21 '15 12:01

zJay


People also ask

Where is the output of a cron job?

On CentOS, my cron output gets "mailed" to /var/spool/mail. See it by running less $MAIL if you want to see cron output for the current user or less /var/spool/mail/root if you want to see cron output for commands running as root.

Where are Cronjobs saved?

When individual user crontabs are edited using crontab -e , the crontab files themselves are stored in /var/spool/cron .

Where are Cronjobs located Linux?

The cron jobs are listed in crontab files and are located in the cron spool area /var/spool/cron/crontabs. Cron searches for these files and load them in the memory for execution.

Where are crontabs stored?

The crontab files are stored in /var/spool/cron/crontabs . Several crontab files besides root are provided during SunOS software installation (see the following table). Besides the default crontab file, users can create crontab files to schedule their own system events.


1 Answers

Have a look on

/etc/rsyslog.d/

there you should can change loglevel of cron .

#cron.*                /var/log/cron.log

removing the # = maximum logging

cron.err                /var/log/cron.log

only error log

like image 64
Daniel Avatar answered Oct 26 '22 08:10

Daniel