← All questionsPython script runs fine by hand and does nothing from cron. Same computer, same folder.
About Python
receipt-pile. python3 receipts.py in the terminal makes the csv every time. From crontab the log says it ran and there's no csv.
Replies
Cron doesn't start in your folder and barely has a PATH. Use the full path to python and cd into the folder in the crontab line: cd /home/you/receipt-pile && /usr/bin/python3 receipts.py. Or make every path inside the script absolute.
Sep 10birdcall, Bilal, Chen W. and others agree
and if it's a venv, cron doesn't know about it. /path/to/venv/bin/python instead of python3
Sep 11Bilal and Dmitri agree
Relative path to the photos folder. It was writing the csv into my home directory the whole time. Thanks.
Sep 11
Sign in to reply.
Replies sit in the order people agree with them; the ones the asker marks “helped” lead. Names, never a number.