Spread the love

1. modify rsyslog config: open /etc/rsyslog.d/50-default.conf,remove # before cron.*

pico /etc/rsyslog.d/50-default.conf
Code language: JavaScript (javascript)
[quote] # Default rules for rsyslog. # # For more information see rsyslog.conf(5) and /etc/rsyslog.conf # # First some standard log files. Log by facility. # auth,authpriv.* /var/log/auth.log *.*;auth,authpriv.none -/var/log/syslog cron.* /var/log/cron.log #daemon.* -/var/log/daemon.log kern.* -/var/log/kern.log #lpr.* -/var/log/lpr.log mail.* -/var/log/mail.log #user.* -/var/log/user.log
Code language: PHP (php)

2. chown syslog:admin cron.log

3. restart rsyslog service: sudo service rsyslog restart

sudo service rsyslog restart

4. restart cron service: service cron restart

service cron restart

Now you can check cron log from file cat /var/log/cron.log

Facebook Comments Box