I am running a python script. The script requires environment variables that are defined in my virtaul environment's ~/.bash_profile
Here is my cronjob script, I edit it by SSHing to my EC2 instance and running:
crontab -e
*/1 * * * * cd /home/ec2-user/code/green_brick_django/pricecomparison_project/pricecomparison && /home/ec2-user/MYVENV/bin/python /home/ec2-user/code/green_brick_django/pricecomparison_project/pricecomparison/run_cronjob_script.sh > /tmp/cronlog.txt 2>&1
I keep getting a python error saying it can't find my ENVIRONMENT variables.
What am I doing wrong? Please help!
I've tried every single option listed here, multiple times over, in every which way I can think of. Please!