sync_backups_to_s3 needs PATH with Laravel Forge scheduler (doc suggestion)
ockam opened this issue · 1 comments
ockam commented
In case someone else has this problem, when using sync_backups_to_s3.sh
with Laravel Forge scheduler, I needed to add PATH
to the script so cron
could find the aws command.
PATH=/home/forge/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
You can also set the command with an absolute path (/home/forge/.local/bin/aws
), but that’s not the recommend way.
khalwat commented
Since the cron tasks are run as the cron user, you could just add it to that account's PATH as well.