Cron Job Troubleshooter

Step-by-step interactive guide to diagnose and fix common cron job issues

Interactive Cron Troubleshooter

Let's diagnose why your cron job isn't working

Step 1

Is your cron job running at all?

Check if the cron job appears to be executing on schedule

Common Cron Issues

  • Environment differences: Cron has limited PATH and environment variables
  • Permission issues: Script lacks execute permissions or wrong ownership
  • Silent failures: No output redirection to capture errors
  • Path issues: Relative paths that don't work in cron context
  • Timezone confusion: Cron uses system timezone, not user timezone

Quick Debug Commands

Check if cron is running

systemctl status cron

View cron logs

tail -f /var/log/cron

List user cron jobs

crontab -l

Test in cron environment

env -i /bin/sh -c 'your-script'

Validate and Convert

After fixing issues, validate your expression and preview next runs across time zones.

Frequently Asked Questions

Cron is installed but my job never runs. Why?

Most failures come from PATH/environment differences. Use absolute paths, set PATH in crontab, and log output and errors to a file.

How do I see what cron is doing?

Check system logs (e.g., /var/log/cron or syslog) and add logging/redirects in your commands to capture stdout/stderr.

My script works manually but fails in cron.

Cron uses a minimal shell, so environment variables and working directories may differ. Source your environment or use absolute paths.