My sysadmin has set up a bunch of cron jobs on my machine. I'd like to know exactly what is scheduled for what time. How can I get that list?
Depending on how your linux system is set up, you can look in:
also, many distros have:
These are simply directories that contain executables that are executed hourly, daily, weekly or monthly, per their directory name.
On top of that, you can have at jobs (check
With most Crons (e.g. Vixie-Cron - Debian/Ubuntu default, Cronie - Fedora default, Solaris Cron ...) you get the list of scheduled cron jobs for the current user via:
or for another user via
To get the crontabs for all users you can loop over all users and call this command.
Alternatively, you can look up the spool files. Usually, they are are saved under
contains all the configured crontabs of all users - except the root user who is also able to configure jobs via the system-wide crontab, which is located at
With cronie (default on Fedora/CentOS), there is a
(As always, the
For convenience, most distributions also provide a directories where linked/stored scripts are periodically executed, e.g.:
The timely execution of those scripts is usually managed via
Note that users beside root may have user systemd instances running where timers are configured, as well. For example, on Fedora, by default, a user systemd instance is started for each user that is currently logged in. They can be recognized via:
Those user timers can be listed via:
An alternative to issuing the
(As with normal service units, a timer unit is enabled via creating a symbolic link in the right systemd config directory.)
To list all crons for the given user.
To list all crons for all users
Run it as a super user