Why Is My Cron Job Not Running? A Debugging Checklist
Your cron job isn't executing and you don't know why. Here's a systematic approach to finding and fixing the problem.
March 25, 2026 · 5 min · 959 words · Rob Washington
Table of Contents
You added a cron job. It should be running. It isn’t. The logs are silent. This is one of the most frustrating debugging experiences in Linux administration because cron fails silently by default.
Here’s a systematic checklist to find the problem.
The most common mistake is incorrect syntax. Cron format is:
MIN: 0-59
HOUR: 0-23
DOM: Day of month (1-31)
MON: Month (1-12)
DOW: Day of week (0-7, where 0 and 7 are Sunday)
Common mistakes:
1
2
3
4
5
6
7
8
9
# WRONG: Using * * * * * * (6 fields)* * * * * * /path/to/script.sh
# RIGHT: 5 fields for timing* * * * * /path/to/script.sh
# WRONG: Forgetting that DOM and DOW are OR'd, not AND'd# This runs on the 15th AND every Monday, not just Monday the 15th0915 * 1 /path/to/script.sh
Validate your syntax:
1
2
3
4
5
# List your crontabcrontab -l
# Edit with syntax checkingcrontab -e
When all else fails, create a wrapper that sets up the environment explicitly:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
# /home/user/scripts/cron-wrapper.sh# Set up the environmentexportPATH=/usr/local/bin:/usr/bin:/bin
exportHOME=/home/user
source /home/user/.bashrc
# Log executionecho"$(date): Starting job" >> /var/log/myjob.log
# Run the actual script/home/user/scripts/actual-script.sh >> /var/log/myjob.log 2>&1# Log completionecho"$(date): Finished with exit code $?" >> /var/log/myjob.log
This logs: timestamp, user, working directory, full environment, and script output.
The pattern with cron is always the same: it runs in a stripped-down environment with no assumptions. Debug by making everything explicit—paths, environment variables, output redirection—and you’ll find the problem.
📬 Get the Newsletter
Weekly insights on DevOps, automation, and CLI mastery. No spam, unsubscribe anytime.