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.
- Open your Ubuntu Terminal (or connect via SSH).
- Open the cron defaults file in the nano text editor:
sudo nano /etc/default/cron
- Look for a line that begins with
EXTRA_OPTS=(it may be empty and look likeEXTRA_OPTS=""). - Change that line to include the
-L 15flag, which tells cron to log everything except the routine start/stop execution messages. It should look exactly like this:
EXTRA_OPTS="-L 15"
- Save the file and exit the editor (in nano, press
Ctrl + O,Enter, thenCtrl + X). - 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.