A daily cron job worked for months but now fails with `/bin/sh: 1: /opt/tools/report.sh: not found`, although the file exists.
AdvancedTroubleshootingBoot, time, cron and kernel
Answer
Likely causes → The script's shebang points to an interpreter that's gone (e.g. #!/usr/bin/python after Python 2 removal), or it's a binary for another architecture or missing its dynamic loader. The "not found" refers to the interpreter, not the script.
Diagnose →
head -1 /opt/tools/report.sh
file /opt/tools/report.sh
ls -l "$(head -1 /opt/tools/report.sh | sed 's/^#!//; s/ .*//')"
Fix → Update the shebang (#!/usr/bin/env python3), install the interpreter, or rebuild the binary for this architecture.
Prevent → Use env-based shebangs and test scripts after OS upgrades.
More on Boot, time, cron and kernel
After a reboot the server drops to `You are in emergency mode. After logging in, type "journalctl -xb" to view system logs`.IntermediateBoot stops at `dracut-initqueue: Warning: dracut-initqueue timeout - starting timeout scripts` and then a `dracut:/#` shell.AdvancedA server shows a `grub>` prompt instead of booting.AdvancedThe kernel panics at boot: `Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)`.AdvancedBoot hangs for 90 seconds with `A start job is running for dev-disk-by\x2duuid-...device (1min 30s)`.IntermediateLogs from different servers are out of order and `timedatectl` shows `System clock synchronized: no` and `NTP service: inactive`.Beginner