Where is the cron / crontab log? / How to enable the Cron Log?

User Avatar
👤 admin
🔴 Admin
✍️ The most important thing in the world is to not be alone.
⏳ Last active: 15 Apr 2025 at 16:01
📅 Created: 14 Feb 2021 at 12:46
👀 Viewed: 17 times
✉️ Send Email
  1. modify rsyslog config: open /etc/rsyslog.d/50-default.conf,remove # before cron.*

pico /etc/rsyslog.d/50-default.conf

[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
  1. chown syslog:admin cron.log

  2. restart rsyslog service: sudo service rsyslog restart


sudo service rsyslog restart
  1. restart cron service: service cron restart

service cron restart

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

[warning]
if you have problems please reboot the server!

If you want to comment: Login or Register