How to List All Cron Jobs on a Mac or Linux PC

Jun 5, 2020 - 7 Comments

Mac Terminal icon

Need to quickly see a list of all cron jobs on a computer? You can easily see all scheduled cron jobs by using the crontab command, and seeing cron data works the same on Mac as well as Linux and most other unix environments too.

Perhaps you have a script or task running and you’re trying to track it down, or perhaps you’re just curious and want to show all crontab for any other reason. Read on to learn how to show all cron jobs for all users, as well as for specific users on a computer.

How to Show All Cron Jobs

At the Terminal or command line, enter the following command syntax:

crontab -l

Hit return to see a list of all cronjobs.

How to List All Cron Jobs for Specific User

You can also check specific users crontab with the following command syntax:

crontab -l -u USERNAME

Again hit return to see a list of all cron jobs and crontab entries for a particular user.

How to list all cron jobs

This is obviously aimed at advanced users, and if you don’t know what cron is you’re probably not the target for this particular article. Of course some explanation may be helpful for the curious, so in short; cron allows for automation of processes from the command line, and scanning through crontab can be helpful if you are aiming to track down startup and login scripts, though for most Mac users they’ll use Login Items instead from the GUI.

Do you have another approach to showing or listing all cron jobs on a Mac, Linux machine, or other computer? Share with us in the comments!

.

Related articles:

Posted by: Paul Horowitz in Command Line, Tips & Tricks

7 Comments

» Comments RSS Feed

  1. DG12 says:

    While the title of this article specifically refers to cron jobs on Apple Mac OS LaunchCtl plists supports the StartCalendarInterval keyword to invoke processes at a specific time and uses several sets of system files.

    To list the ones which are triggered based on calendar/times use the commands:

    grep StartCalendarInterval /System/Library/LaunchAgents/*

    grep StartCalendarInterval /System/Library/LaunchDaemons/*

    grep StartCalendarInterval /Library/LaunchDaemons/*

    grep StartCalendarInterval /Library/LaunchAgents/*

    In addition there may be launchctl files in each users ~/Library/LaunchAgents directory

  2. JP Giolma says:

    crontab -l resulted in ‘crontab: no crontab for jgiolma’

  3. Bob says:

    This actually doesn’t work on my High Sierra Mac unless you add “sudo” in front of it. Otherwise I just get “command not found”. So if you get that error just write:

    “sudo crontab -l” or “sudo crontab -l -u USERNAME” and type your admin (root) password.

    Maybe can update the article to include this?

  4. David Arnstein says:

    The command “crontab” shows jobs registered to the current user only.

  5. Mirco says:

    Cronjobs are back? Thought, they were gone and replaced by launchd with MacOS X 10.5 or 10.6 more than a decade ago.

    List root cronjobs:
    sudo crontab -l

    List launchd jobs:
    launchctl list

    List root launchd jobs:
    sudo launchctl list

  6. Trudge says:

    Good article on using cron. I run High Sierra on an ‘elder’ Mac and wanted to automate a Perl backup script I wrote. Found some good information at the following:
    https://ole.michelsen.dk/blog/schedule-jobs-with-crontab-on-mac-osx.html

    https://alvinalexander.com/mac-os-x/mac-osx-startup-crontab-launchd-jobs/

    I also created a cron.deny & cron.allow file in /usr/lib/cron

    On my system I typically run as a general user, and edit the crontab file via ‘env EDITOR=nano crontab -e’.

  7. Simon says:

    Hi, i didn´t understand this post on a MAC website!
    As I understand cron is end-of-life on macOS and since many releases launchctl is THE Choice for scheduled starting of programs!

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site