A Script That Works by Hand but Not From cron
A script runs fine in your shell but fails from cron with command not found. What is the most likely cause?
command not found
Choose one answer
The crontab line needs sudo -E in front of the script to keep your environment.
sudo -E
cron runs jobs as root, which can't find user programs.
cron jobs can't execute scripts, only binaries.
cron runs jobs with a minimal environment and PATH.
PATH