How to Find and Enable Cron Logs in Ubuntu and Debian (2026)

If you manage Ubuntu or Debian servers, you know that Cron is the backbone of system automation.

But what happens when a scheduled task fails? Where do you check for errors?

In this guide, we will show you exactly how to locate and configure your Crontab logs in 2026.

1. Where are Cron logs located by default?

Unlike other services, Cron on Ubuntu and Debian does not have its own dedicated log file out of the box.

Instead, it sends all output to the general syslog. To filter only the scheduled tasks, you can use the grep command:

grep CRON /var/log/syslog

This command will display every time a cron job was triggered, which user ran it, and what command was executed.

2. How to Enable a Dedicated cron.log File

For better monitoring and to keep your syslog clean, it is a professional best practice to have an exclusive log file located at /var/log/cron.log.

Follow these steps to enable it:

  1. Edit the Rsyslog configuration: Open the configuration file with your favorite editor:

    sudo nano /etc/rsyslog.conf


  2. Uncomment the Cron line: Look for the following line and remove the “#” symbol at the beginning:

    cron.* /var/log/cron.log


  3. Restart the service: Apply the changes by restarting rsyslog:

    sudo systemctl restart rsyslog


Now, all future cron activities will be recorded in /var/log/cron.log.

3. Troubleshooting: Why is my script not running?

If you see the task in the log but the script didn’t produce the expected result, check these three common issues:

  • Environmental Variables: Cron uses a very limited $PATH. Always use absolute paths for commands (e.g., /usr/bin/python3 instead of just python3).
  • Permissions: Ensure your script is executable by running chmod +x /path/to/script.sh.
  • User Context: Remember that a task in the root crontab runs with different permissions than a task in a user crontab.

Pro Tip: Monitoring logs is even more critical when running services on cloud instances with limited resources. If you are looking for a place to test your scripts, check out my guide on Setting Up a Free Oracle Cloud Ubuntu Server. It’s a great way to have a 24/7 machine for your automation projects without spending a dime.

Conclusion

Understanding how to read and enable cron logs is essential for any Linux Sysadmin.

Whether you stick with the default syslog or move to a dedicated file, monitoring your automation is the only way to ensure your backups and routines are healthy.

Struggling with a specific crontab syntax? Let us know in the comments below!

Leave a Comment