List All Cron Jobs: Check crontab & System Jobs
In this article
The short answer: there is no single command that lists every cron job on a Linux system. You must check the user crontabs, the system crontab, and the cron directories separately. This article walks through each location and gives you the exact commands to see every scheduled task.
Where Cron Jobs Actually Live
Cron jobs are stored in several different places, depending on whether they belong to a user or to the system. The cron daemon reads all of these locations when it decides what to run. The main ones are:
- User crontabs – stored in
/var/spool/cron/crontabs/(on Debian/Ubuntu) or/var/spool/cron/(on RHEL/CentOS). Each user has a file named after their username. - System crontab – the file
/etc/crontab, which includes an optional user field in each line. - Cron directories –
/etc/cron.d/,/etc/cron.hourly/,/etc/cron.daily/,/etc/cron.weekly/, and/etc/cron.monthly/. Scripts placed in these directories run on the schedule implied by the directory name. - Anacron –
/etc/anacrontab, which handles jobs that might be missed if the system was off.
Each location is checked independently, so a complete list must include all of them.
How to List Your Own Cron Jobs
To see the crontab entries for the current user, run:
crontab -l
If there are no jobs, the command prints no crontab for username and exits with a non-zero status. To view another user's crontab (if you have permission), use:
crontab -u username -l
This only shows the user's personal crontab, not system-wide jobs. Many newcomers expect this command to show everything, but it does not.
How to List System-Wide Cron Jobs
System jobs are not stored in user crontabs. To see them, you need to inspect the system crontab and the cron directories:
cat /etc/crontab
ls -l /etc/cron.d/ /etc/cron.hourly/ /etc/cron.daily/ /etc/cron.weekly/ /etc/cron.monthly/
For a quick look at what is scheduled, you can print the contents of all files in /etc/cron.d/ with:
cat /etc/cron.d/*
Note that the files in the cron.* directories are usually scripts, not crontab entries. The cron daemon runs them at the time defined in /etc/crontab (for example, daily jobs at 6:25 AM by default on many systems).
How to List All Cron Jobs for All Users
To see every user's crontab, you must loop through the spool directory. As root, run:
for user in $(cut -f1 -d: /etc/passwd); do echo "### $user"; crontab -u $user -l 2>/dev/null; done
This iterates over all users and prints their crontab if one exists. The 2>/dev/null suppresses the no crontab error messages. A simpler alternative that works on many systems:
for file in /var/spool/cron/crontabs/*; do echo "### $file"; cat "$file"; done
On RHEL/CentOS, the path is /var/spool/cron/ instead. Adjust the path to match your distribution.
Common Problems and Misconceptions
- Misconception:
crontab -lshows everything. It only shows the current user's jobs. System jobs and other users' jobs are invisible without extra commands. - Problem: Jobs in
/etc/cron.d/have a different format. Each line in/etc/cron.d/must include a user field, just like/etc/crontab. If you copy a user crontab line there, it will fail. - Problem: Cron directories run scripts, not crontab lines. You cannot put a crontab entry in
/etc/cron.daily/; you must place an executable script there. - Misconception:
crontab -eedits the system crontab. It edits your personal crontab. To edit the system crontab, usesudo nano /etc/crontabor place a file in/etc/cron.d/.
How to Choose the Right Location for a New Job
Deciding where to put a cron job depends on who should own it and how often it runs:
- If the job is for a single user and does not need root privileges, use
crontab -e. - If the job needs root privileges or affects the whole system, put it in
/etc/cron.d/with a descriptive filename (e.g.,/etc/cron.d/backup). - If the job runs daily, weekly, or monthly and is a simple script, drop it into the corresponding
/etc/cron.*directory. This is often cleaner than writing a crontab line. - If the system might be off when the job is scheduled, use anacron (via
/etc/anacrontab) to ensure it runs after boot.
Frequently Asked Questions
How do I list cron jobs for another user?
Use crontab -u username -l as root. If you are not root, you will get a permission denied error. The command only works if the user has a crontab; otherwise it prints no crontab for username.
How do I see cron jobs that are currently running?
Cron does not keep a log of running jobs by default. Check the system log with grep CRON /var/log/syslog (on Debian/Ubuntu) or grep cron /var/log/cron (on RHEL/CentOS). This shows when each job was started and finished, but not the output of the job itself.
What is the difference between /etc/crontab and /etc/cron.d/?
Both are system crontabs. /etc/crontab is a single file, while /etc/cron.d/ is a directory where you can drop multiple files. The format is identical: each line includes a user field. The main advantage of /etc/cron.d/ is that package managers can install and remove individual files without editing a shared file.
Why is my cron job not running?
Common causes: the cron service is not running (systemctl status cron), the script is not executable, the script uses a full path but the environment lacks necessary PATH variables, or the job line has a syntax error. Check the cron log for error messages like No such file or directory or bad minute.
Can I list cron jobs without root access?
You can list your own crontab with crontab -l without root. You can also read /etc/crontab and the /etc/cron.* directories if they are world-readable, which they usually are. But you cannot see other users' crontabs without root.
Do cron jobs run if the system is asleep or off?
No. Cron only runs jobs when the system is on and the cron daemon is active. If the system is off at the scheduled time, the job is missed. Anacron solves this by running missed jobs after the next boot, but it only works for daily, weekly, and monthly jobs, not for jobs with a specific time of day.