I have a simple Python script that I am trying to setup as a cron job, but it refuses to run. It does run when I run it by itself calling it as:
python script.py
I have tried setting my evironment variables in the crontab, but I cant get it to work. My crontab looks like this:
# For more information see the manual pages of crontab(5) and cron(8)
# m h dom mon dow command
SHELL=/bin/bash
PATH=/home/netadmin/bin:/home/net/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/b$
*/2 * * * * PYTHONPATH=/user/bin/python /home/net/path-to-script/script.py >>/home/net/out.txt 2>&1
Any Ideas on this?