cron job runs but produces nothing, PATH is probably it
A backup script that's been working for months stopped doing anything in April. Debian 12 box, script in /etc/cron.d/backup, runs at 03:15 as root. The cron mail says /bin/sh: 1: aws: not found but the mail is easy to miss. aws s3 sync works fine when I run the same script by hand. I assume cron has a shorter PATH. What's the cleanest fix that doesn't involve hardcoding /usr/local/bin/aws in twelve places?
4 replies