Summary
Hi all, I’m obtaining an error when running a bash script via cron. The script errors out when it reaches the following command; keep in mind that the bash script swaps out ${END_DATE}
with the date the script was run:
python -c "import shutil; shutil.make_archive('packages/weekly-report-${END_DATE}', 'zip', 'output/${END_DATE}/')"
Error produced (line 53 is what I posted above):
line 53: python: command not found
Cron settings (python snippet is located in the bash script):
m h dom mon dow command
5 3 * * 1 /data/run-WP046-cronjob.sh
What I’ve Tried
I do not get this error when running the script as as my profile. Python successfully imports shutil
& zips my desired directory. Has anyone experienced this? I’ve looked online and can’t find similar problem examples.
Please let me know if I’m missing needed information for this question.