Cron Job Not Running? 7 Things to Check

Published April 2025 · 5 min read

Your cron job is set up but nothing happens. Here are the 7 most common reasons and fixes.

1. Wrong Cron Expression

Double-check your expression. 0 9 * * * means 9 AM, not 9 PM. Use our Cron Parser to verify.

2. Wrong PATH

Cron runs with a minimal PATH. Always use full paths:

# ❌ Wrong
* * * * * python script.py

# ✅ Correct
* * * * * /usr/bin/python3 /home/user/script.py

3. Permission Issues

chmod +x /home/user/script.sh
# Check crontab owner
crontab -l  # current user's crontab

4. No Newline at End of Crontab

Crontab MUST end with a blank newline. Without it, the last job won't run.

5. Environment Variables Missing

Cron doesn't load your .bashrc or .profile. Set variables in crontab:

SHELL=/bin/bash
PATH=/usr/local/bin:/usr/bin:/bin
* * * * * /home/user/script.sh

6. Check the Logs

# Check cron logs
grep CRON /var/log/syslog

# Or redirect output in crontab
* * * * * /home/user/script.sh >> /tmp/cron.log 2>&1

7. Cron Service Not Running

sudo systemctl status cron
sudo systemctl start cron

Related