How to Stop the Ubuntu ‘Cron’ Daemon from Logging to Syslog

The Syslog Spam

In Ubuntu, the cron daemon is responsible for running scheduled tasks in the background. By default, every single time a cron job executes, the daemon logs a message to the primary system log file located at /var/log/syslog (or /var/log/messages on some systems).

If you have a server running a high-frequency script—such as a monitoring ping that fires every minute, or a queue worker that runs every 30 seconds—your syslog will become completely flooded with thousands of identical cron execution notices. This “syslog spam” makes it incredibly difficult to read the logs and spot actual system errors or security warnings. You can configure the cron daemon to stop logging routine executions to syslog.

How to Stop Cron from Logging to Syslog

You can change the logging level of the cron daemon by editing its default configuration file.

  1. Open your Ubuntu Terminal (or connect via SSH).
  2. Open the cron defaults file in the nano text editor:
sudo nano /etc/default/cron
  1. Look for a line that begins with EXTRA_OPTS= (it may be empty and look like EXTRA_OPTS="").
  2. Change that line to include the -L 15 flag, which tells cron to log everything except the routine start/stop execution messages. It should look exactly like this:
EXTRA_OPTS="-L 15"
  1. Save the file and exit the editor (in nano, press Ctrl + O, Enter, then Ctrl + X).
  2. Finally, restart the cron service for the new configuration to take effect:
sudo systemctl restart cron

From now on, cron will still execute your scheduled tasks perfectly, and it will still log critical errors if a job fails, but it will no longer pollute your primary syslog with a notification every time a routine job simply starts running.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.