← Back to all fixes
Cron job not running as expected
The Issue
You added a crontab entry but the script never executes at the scheduled time.
Root Cause
Common causes: wrong cron syntax, script not executable, PATH is different in cron environment (no /usr/local/bin etc.), or output silently failing because cron has no mail configured.
How to Fix
Verify cron syntax at crontab.guru — paste your expressionMake script executable: `chmod +x /path/to/script.sh`Redirect output to a log to capture errors: `* * * * * /path/script.sh >> /tmp/cron.log 2>&1`Use absolute paths inside the script — cron has a minimal PATHCheck cron logs: `grep CRON /var/log/syslog | tail -20`Test the script manually as the cron user: `sudo -u www-data /path/script.sh`