🎯 Mission Briefing: The Silent Cron Job
Last night's backup never happened. The job is scheduled, nobody touched the server, and there's no error message anywhere obvious. Cron jobs fail quietly — your job is to find out why.
Your objective
Confirm the job is scheduled, find evidence of the failure in the logs, fix the cause, and prove the backup works.
Investigation toolkit
crontab -l # What is scheduled, and when?
journalctl -u cron -n 20 # What did cron do last night?
grep CRON /var/log/syslog # The same story in the classic syslog
ls -l ~/scripts/backup.sh # Can the script actually be executed?
Fix and verify
chmod +x ~/scripts/backup.sh # A script needs the execute bit to run directly
~/scripts/backup.sh # Run it by hand, the same way cron does
ls -lh ~/backups # Did the backup file appear?
💡 Exit status 126 means "found the file, but couldn't execute it" — almost always a permissions problem.