Back to Blog
Reference4 min read

How to List All Cron Jobs for All Users

Every crontab command, system directory, and script you need to find every scheduled job on a Linux or macOS machine. Copy-paste ready.

Quick Commands

WhatCommand
Current usercrontab -l
Specific usersudo crontab -l -u username
All users (loop)See script below
System crontabcat /etc/crontab
Cron directoriesls /etc/cron.d/ /etc/cron.daily/ ...
systemd timerssystemctl list-timers --all

List Cron Jobs for Current User

The crontab -l command displays the crontab for whoever is currently logged in:

crontab -l

If you have no cron jobs, you will see no crontab for username.

To edit your crontab (opens in your default editor):

crontab -e

List Cron Jobs for a Specific User

Use the -u flag with sudo to view another user's crontab:

sudo crontab -l -u www-data

Replace www-data with any username. Common service accounts to check:

sudo crontab -l -u root
sudo crontab -l -u www-data
sudo crontab -l -u nobody
sudo crontab -l -u postgres
sudo crontab -l -u mysql

List Cron Jobs for ALL Users

This one-liner loops through every user in /etc/passwd and prints their crontab:

for user in $(cut -d: -f1 /etc/passwd); do
  echo "=== $user ==="
  crontab -l -u $user 2>/dev/null
done

Run this with sudo. The 2>/dev/null suppresses "no crontab for ..." messages. To show only users that have cron jobs:

for user in $(cut -d: -f1 /etc/passwd); do
  crontab_output=$(crontab -l -u "$user" 2>/dev/null)
  if [ -n "$crontab_output" ]; then
    echo "=== $user ==="
    echo "$crontab_output"
    echo ""
  fi
done

System-Wide Cron Locations

User crontabs are only half the picture. The cron daemon also reads from several system directories:

/etc/crontab

The system-wide crontab. Unlike user crontabs, this file includes a user field between the schedule and the command:

cat /etc/crontab

/etc/cron.d/

Drop-in cron files. Packages install their schedules here:

ls -la /etc/cron.d/
cat /etc/cron.d/*

/etc/cron.{hourly,daily,weekly,monthly}/

Scripts placed in these directories run at the corresponding interval via run-parts or anacron:

ls /etc/cron.hourly/
ls /etc/cron.daily/
ls /etc/cron.weekly/
ls /etc/cron.monthly/

List systemd Timers

Modern Linux systems often use systemd timers alongside or instead of cron. List all active timers:

systemctl list-timers --all

This shows the next trigger time, last trigger time, and the associated service unit. To see only active timers, omit --all:

systemctl list-timers

List Cron Jobs on macOS

macOS supports cron, but Apple prefers launchd for scheduled tasks. Check both:

Traditional cron

crontab -l

launchd agents and daemons

# User launch agents
ls ~/Library/LaunchAgents/

# System-wide agents
ls /Library/LaunchAgents/

# System daemons
ls /Library/LaunchDaemons/

# List all loaded services
launchctl list

Full Audit Script

This script checks every cron location at once. Save it as list-all-cron.sh and run with sudo:

#!/bin/bash

echo "========== USER CRONTABS =========="
for user in $(cut -d: -f1 /etc/passwd); do
  crontab_output=$(crontab -l -u "$user" 2>/dev/null)
  if [ -n "$crontab_output" ]; then
    echo "--- $user ---"
    echo "$crontab_output"
    echo ""
  fi
done

echo "========== /etc/crontab =========="
cat /etc/crontab 2>/dev/null

echo ""
echo "========== /etc/cron.d/ =========="
for file in /etc/cron.d/*; do
  [ -f "$file" ] && echo "--- $file ---" && cat "$file" && echo ""
done

echo "========== CRON DIRECTORIES =========="
for dir in /etc/cron.hourly /etc/cron.daily /etc/cron.weekly /etc/cron.monthly; do
  echo "--- $dir ---"
  ls "$dir" 2>/dev/null
  echo ""
done

echo "========== SYSTEMD TIMERS =========="
systemctl list-timers --all 2>/dev/null || echo "systemd not available"

CronJobPro Dashboard

With CronJobPro, all your scheduled jobs are visible in a single dashboard. No SSH access needed, no scripts to run, no directories to remember. Every job shows its schedule, last run time, status, and full execution log.

Failed jobs trigger instant alerts. You can search, filter, and export your job list. If a cron job stops running, you will know immediately instead of discovering it days later in a log file.

FAQ

How do I list all cron jobs for the current user?

Run crontab -l. This reads from the user's crontab file stored in /var/spool/cron/crontabs/ (Debian/Ubuntu) or /var/spool/cron/ (CentOS/RHEL).

How do I list cron jobs for all users on Linux?

Loop through all users with a for loop reading /etc/passwd and running crontab -l -u for each. See the full script above. This requires root or sudo access.

Where are system-wide cron jobs stored?

In /etc/crontab and the /etc/cron.d/ directory. Additionally, scripts in /etc/cron.daily/, /etc/cron.hourly/, /etc/cron.weekly/, and /etc/cron.monthly/ run at those intervals via run-parts or anacron.

How do I list cron jobs on macOS?

Use crontab -l for traditional cron. macOS also uses launchd — check ~/Library/LaunchAgents/, /Library/LaunchDaemons/, and run launchctl list.

What is the difference between crontab -l and crontab -e?

crontab -l lists (displays) the current crontab without making changes. crontab -e opens the crontab in your default editor for modifications. Always use -l first to verify before editing.

Related Articles

See all your cron jobs in one place

CronJobPro gives you a single dashboard for all your scheduled tasks — with monitoring, alerts, and execution logs. No SSH needed. Free for up to 5 jobs.