📖 ~1 min read
Table of contents
Symptom & Impact
Scheduled maintenance tasks do not execute, causing stale data and missed backups.
Environment & Reproduction
Often due to environment assumptions not present in cron.
systemctl status cron
crontab -l
sudo grep CRON /var/log/syslog | tail -n 40
Root Cause Analysis
Incorrect cron syntax, missing executable bit, or limited PATH in non-interactive shell.
Quick Triage
Validate cron daemon activity and job definitions.
systemctl is-active cron
crontab -l
sudo ls -l /etc/cron.*
Step-by-Step Diagnosis
Test job command with minimal environment.
env -i /bin/bash -lc '/path/to/script.sh'
namei -l /path/to/script.sh
file /path/to/script.sh

Solution – Primary Fix
Use absolute paths, executable scripts, and explicit shell settings.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
chmod +x /path/to/script.sh
( crontab -l; echo 'SHELL=/bin/bash'; echo 'PATH=/usr/sbin:/usr/bin:/sbin:/bin'; echo '*/15 * * * * /path/to/script.sh >> /var/log/script.log 2>&1' ) | crontab -

Solution – Alternative Approaches
Migrate critical jobs to systemd timers for better observability.
systemctl list-timers --all
systemctl status cron
Verification & Acceptance Criteria
Cron executes on schedule and writes expected logs.
sudo grep CRON /var/log/syslog | tail -n 50
tail -n 50 /var/log/script.log
Rollback Plan
Restore previous crontab from backup if schedule changes regress behavior.
crontab -l > /var/tmp/crontab.bak.$(date +%s)
# restore with crontab
Prevention & Hardening
Version-control job definitions and alert on missed executions.
Related Errors & Cross-Refs
Can be confused with time zone drift or disabled cron service.
Related tutorial: View the step-by-step tutorial for Ubuntu 24.04 LTS.
View all Ubuntu 24.04 LTS tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Ubuntu cron and systemd timer operational best practices.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.