List all cron jobs for all users

Modern versions of Cron allow you to schedule jobs many different ways so when you need to find all of the cron jobs on a server they may be in many places including:

  • Each user's individual crontab
  • The system crontab
  • The system cron drop-in directory

In this guide, you'll learn a trick for finding cron jobs quickly no matter where they are scheduled. As a bonus, we'll show how our free software, CronitorCLI, can make this and other cron management tasks easier for you in the future.

You can't trust cron jobs!

We created Cronitor after a critical cron job failed silently for months. Cronitor is easy to use and provides you with instant alerts when things go wrong. Learn more

Finding cron jobs quickly

The trick to finding cron jobs quickly is to bypass the familiar user interface of the crontab command and instead, for this exercise, look under the hood where cron itself store this data. Before you begin, you will need elevated root or sudo privileges to list jobs other than your own. With that arranged, begin your 3-stop tour.

  1. Checking the system crontab

    The first place to look is the system crontab. Only users with privileged access can write here and this will often contain cron jobs that support system-level functions.

    $ cat /etc/crontab
    0 0 * * * dataproc create-rollups.py
    

    When scheduling jobs in this and other system-level crontab files the run-as user is listed after the schedule. This job as run as user dataproc.

  2. Checking the system drop-in directory

    A more modern and preferred way to scheduling system-level cron jobs, the crontab drop-in directory at /etc/cron.d may contain crontab files that each can have multiple cron jobs.

    Display the contents of all files easily:

    $ cat /etc/cron.d/*
  3. Viewing each user's crontab

    As a rule, you should always use crontab -e and never modify crontab files directly. Doing so ensures your changes are valid and picked-up by the cron daemon. But when the job is just viewing the crontabs, looking at the files themselves is the easiest way to find every job for every user.

    Ubuntu/Debian
    $ cat /var/spool/cron/crontabs/*
    Redhat, CentOS, Amazon Linux, Suse
    $ cat  /var/spool/cron/*
  4. After checking these 3 places you can be confident you have found all cron jobs running on the server.

An easier way to manage cron jobs

In addition to finding cron jobs our open-source software, CronitorCLI, can take the pain from cron job testing and debugging. Installing is free and easy, and you don't have to use our monitoring service to use many of its features.

  1. Download CronitorCLI

    A simple and free executable, all you have to do is download and decompress the CronitorCLI binary. You'll be scanning in seconds.

    CronitorCLI Installation Guide

  2. Listing all cron jobs for all users in a single command

    After decompressing, use the list command to view all cron jobs.

    CronitorCLI List Example

    Here there are 8 cron jobs in two crontabs. If there were 400 cron jobs in 40 crontabs, all of them would be listed.

  3. Bonus: Easily run any command the way cron does

    CronitorCLI includes other great free tools like select and shell to run commands the way cron does.


Our software, CronitorCLI, includes the free tools we always wished we had.  Scan your system and list every cron job in seconds using cronitor list.  Run any cron job instantly using cronitor select.