I am running a python script from a python library which loads some environment variables from a .env
file in the root of the library using dotenv.
This works from the command line, but when I try to run as a cronjob using the following:
* * * * * source ./path_to_venv/activate; python ./path_to_script.py
I get a key error because it can't find the environment variable.
Any ideas why this isn't working?
Many thanks for any help!