failover.io
  1. Home
  2. Guides
  3. List cron jobs

How to list cron jobs in Linux

crontab -l shows your own. These commands find every other cron job on the server.

Updated 19 November 20263 min read

To list your own cron jobs, run:

crontab -l

That only shows the current user's crontab. Cron jobs also live in other users' crontabs, in system folders and as systemd timers. The commands below find all of them on a Linux server.

Another user's cron jobs

sudo crontab -u www-data -l

no crontab for www-data means that user has none.

Every user's cron jobs

for u in $(cut -d: -f1 /etc/passwd); do sudo crontab -u "$u" -l 2>/dev/null | sed "s/^/$u: /"; done

This goes through every account and prints each cron line with the user's name in front. Comment lines are included.

The crontabs themselves are files, one per user. Don't edit them directly; use crontab -e. To see which users have one:

sudo ls /var/spool/cron/crontabs

That is the path on Debian and Ubuntu. On Red Hat based systems, it is /var/spool/cron.

System cron jobs

Packages and admins also put jobs outside the user crontabs:

LocationWhat runs there
/etc/crontabThe system crontab. Its lines have a sixth field: the user to run as.
/etc/cron.d/One file per package or task, same format as /etc/crontab.
/etc/cron.hourly/, daily, weekly, monthlyScripts run once per period. The time is set in /etc/crontab or by anacron.
cat /etc/crontab
ls /etc/cron.d/ /etc/cron.hourly/ /etc/cron.daily/ /etc/cron.weekly/ /etc/cron.monthly/

systemd timers

Many scheduled tasks on modern Linux are systemd timers, not cron jobs. List them with the next and last run times:

systemctl list-timers --all

How timers differ from cron, and when to use which: systemd timer vs cron.

Read a cron line

Each line starts with five time fields. 0 3 * * 1 means 3:00 every Monday. Paste any of them into the cron expression tester to see the next run times, or see what a cron job is for the fields.

Found a job that matters?

A list shows what should run, not what did. For each job you rely on, add a heartbeat ping after the command, so you get an alert the first time it doesn't run. See how to monitor cron jobs.

Frequently asked questions

How do I list all cron jobs in Linux?

Run crontab -l for your own, sudo crontab -u USER -l for another user, then check /etc/crontab, /etc/cron.d/ and the /etc/cron.daily/ style folders. systemctl list-timers --all lists systemd timers.

Where are crontab files stored?

In /var/spool/cron/crontabs/ on Debian and Ubuntu, and /var/spool/cron/ on Red Hat based systems, one file per user. Edit them with crontab -e, not directly.

What does "no crontab for user" mean?

That user has no personal crontab. They can still have jobs in /etc/crontab or /etc/cron.d/.

How do I list cron jobs on macOS?

Run crontab -l. Most scheduled tasks on macOS are launchd jobs instead; list them with launchctl list.