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.
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.
When individual user crontabs are edited using crontab -e , the crontab files themselves are stored in /var/spool/cron .
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With