Skip to content Use Monity from Claude, ChatGPT or Codex: set up monitors and ask what changed, from a chat. Use Monity from Claude, ChatGPT or Codex Connect yours
Tutorial 6 min read

Cron job not running? A checklist to find out why

Six checks to fix a Linux cron job that is not running: daemon status, PATH and /bin/sh environment, /etc/cron.d permissions, crontab syntax traps, timezones, logs and heartbeat alerts.

Alex Lead Product Designer
UpdatedDecember 1, 2026 Read time6 min AudienceLinux sysadmins, DevOps and developers

When a Linux cron job does not run, the cause is almost always one of six things: a stopped cron daemon, a stripped PATH or environment under /bin/sh, wrong script or /etc/cron.d permissions, a crontab syntax error, a timezone mismatch, or a silent failure with no captured output. Work through the six checks below, verify your schedule with the free Cron Expression Generator on Monity (monity.ai), and add a heartbeat monitor so future silent stops trigger an alert.

1. Check that the cron daemon is running

If the daemon is stopped or disabled after a server rebuild, no jobs run and nothing is logged. Check the service status first (the unit is cron on Debian and Ubuntu, and crond on RHEL, Rocky and Fedora):

# Debian / Ubuntu
systemctl status cron

# RHEL / Rocky / Alma / Fedora
systemctl status crond

# Verify a running daemon process
pgrep -a cron

If it is inactive, start and enable it with sudo systemctl enable --now cron (or crond).

2. Check PATH, shell and environment variables

A script that works in your terminal often fails under cron because cron does not load your interactive shell profile. Per crontab(5), cron sets SHELL=/bin/sh along with LOGNAME and HOME from /etc/passwd. Tools installed in /usr/local/bin, Python virtualenvs or Node version managers are not on cron’s default PATH.

Reproduce cron’s minimal environment from your terminal before editing anything:

env -i HOME="$HOME" LOGNAME="$USER" PATH=/usr/bin:/bin /bin/sh -c '/usr/local/bin/backup.sh'

To fix it, either use full binary paths inside your script (such as /usr/local/bin/python3) or set PATH and SHELL explicitly at the top of the crontab:

SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

3. Check permissions and ownership

Both the script and the crontab file have strict permission requirements:

  • The script itself: Give it execute permission (chmod +x /usr/local/bin/backup.sh) and start it with a valid shebang such as #!/usr/bin/env bash. Confirm the crontab’s user can read input files and write to target directories.
  • Files in /etc/cron.d/ and /etc/crontab: Per cron(8), /etc/crontab and files under /etc/cron.d must be owned by root and must not be group- or other-writable. Fix them with sudo chown root:root /etc/cron.d/myjob && sudo chmod 0644 /etc/cron.d/myjob. On Debian and Ubuntu, file names in /etc/cron.d may hold only letters, digits, underscores and hyphens, so a file named myjob.sh or backup.conf is skipped without a word.
  • /etc/cron.hourly, daily, weekly and monthly: Scripts placed in these directories must be executable.

4. Check crontab syntax mistakes

List the active user crontab with crontab -l (or sudo crontab -u <user> -l) and look for four common syntax traps documented in crontab(5) and Debian crontab(5):

  • Missing username column in system crontabs: User crontabs edited with crontab -e take 5 time fields plus the command. System files (/etc/crontab and /etc/cron.d/*) require a 6th field, the username, between the schedule and the command (for example, 0 3 * * * root /usr/local/bin/backup.sh).
  • Unescaped % characters: Per crontab(5), any unescaped % in a command is turned into a newline and everything after the first % is sent to standard input. A command like date +%F breaks unless written as date +\%F.
  • Both day-of-month and day-of-week set: Per crontab(5), if neither field is *, cron runs when either field matches. For example, 30 4 1,15 * 5 runs on the 1st and 15th of the month and every Friday.
  • Inline comments: Comments starting with # must sit on their own line; an inline # after a command or variable assignment is treated as part of that command or value.

Paste any schedule into Monity’s free Cron Expression Generator to read the expression in plain English and check its next run times in UTC or local time.

5. Check timezone and daylight saving time

Many cloud servers default to UTC, so a job scheduled for 0 8 * * * runs at 08:00 UTC rather than your local 8 AM. Check the host timezone with:

timedatectl
date

On systems running cronie, crontab(5) supports setting CRON_TZ inside the crontab to schedule entries in a chosen timezone (cron still timestamps its logs in the daemon’s local timezone). Per cron(8), when a clock shifts by less than 3 hours for daylight saving time, fixed-time jobs in a skipped hour run soon after the shift, and jobs in a repeated hour do not run a second time.

6. Inspect cron logs and capture script output

Check whether cron attempted to start the job at all:

# Debian / Ubuntu (systemd journal or rsyslog)
journalctl -u cron -n 50 --no-pager
grep CRON /var/log/syslog | tail -n 30

# RHEL / Rocky / Alma / Fedora
journalctl -u crond -n 50 --no-pager
tail -n 50 /var/log/cron

Cron’s log only records that the command started, not whether it exited cleanly. Unless a local mail transfer agent delivers MAILTO mail (and MAILTO="" is not set), stderr disappears. Redirect both stdout and stderr to a log file while debugging:

*/5 * * * * /usr/local/bin/backup.sh >> /var/log/backup-cron.log 2>&1

Catch the next silent failure with heartbeat alerts

A checklist fixes today’s broken job, but a job that stops running next month writes nothing to its log. Monity’s uptime monitoring includes Heartbeat monitors: a cron job or worker calls a link after it succeeds, and no call in time alerts. See our cron job monitoring guide for copy-paste crontab, systemd, GitHub Actions and Kubernetes examples.

Heartbeat monitors support schedules up to daily (the fastest interval follows the plan: every 5 minutes on the Free plan with 3 monitors and 100 credits a month, every minute on plans that check pages every 15 to 60 minutes, and every 30 seconds on plans that check pages every 5 minutes; 1,000 uptime checks use 1 credit). Alerts go to email, Slack, Microsoft Teams, Discord, Telegram, Google Sheets (one row per alert), signed webhooks (HMAC-SHA256) or push notifications in the iOS and Android app on every plan.

Monity Uptime Alerts settings showing Alert as soon as confirmed down, Tell me when it is back up toggle, and alert channels for Email, Slack, Teams, Telegram, Discord and Google Sheets
An uptime monitor’s alert settings in Monity: alert once it’s confirmed down, say when it’s back up, and the channels (email, Slack, Teams, Telegram, Discord and Google Sheets). Heartbeat monitors use the same alert channels.

What a heartbeat alert tells you

A heartbeat alert tells you a scheduled job didn’t check in on time. Keep writing the job’s output to a local log file, because the heartbeat doesn’t carry stdout or stderr and the log has the cause. A server that can’t make outbound HTTPS calls can’t reach a heartbeat URL, so use local monitoring or systemd failure hooks there.

FAQ

Questions people ask

Why does my script work in the terminal but fail in cron?

Cron runs commands with /bin/sh and a minimal environment instead of loading ~/.bashrc or ~/.profile. Use absolute paths to binaries and files, or declare PATH and SHELL at the top of the crontab.

Why does a cron command with date +%F fail?

Per crontab(5), cron turns any unescaped % character in a command into a newline and passes the remaining text to standard input. Escape it as date +\%F or move the command into a shell script.

Do I need to restart cron after editing a crontab?

No. Per cron(8), cron checks the modification time of its spool directory and /etc/crontab every minute and reloads changed crontabs automatically.

Why is my /etc/cron.d/ file being ignored?

Four common causes are omitting the username column before the command, leaving the file owned by a non-root user, making it group- or world-writable (cron(8) requires root ownership and no group or other write bits), or, on Debian and Ubuntu, a dot in its name: myjob.sh is skipped, myjob runs.

Where are cron logs stored on Linux?

Use journalctl -u cron (or grep CRON /var/log/syslog) on Debian and Ubuntu, and journalctl -u crond (or /var/log/cron) on RHEL, Rocky, Alma and Fedora systems.

How do I get alerted when a cron job stops running?

Create a Heartbeat monitor in Monity and have the cron job call its URL when it finishes. If no call arrives in time, Monity sends an alert over email, Slack, Microsoft Teams, Discord, Telegram, Google Sheets, webhooks or mobile push.

Written by

Alex

Alex leads product design at Monity. From the plain-English setup to the way an alert is laid out, her work is about making website monitoring something anyone can use, technical or not. She writes here about product design and usability.

More by author
Kamil, Alex and Martyna A person replies within two working days

Have a question?

Pricing, security or scoping: pick one and your message goes to a person on the team.