Monday, 7 December 2020

How do I restore my Python cron jobs after my Mac OS upgrade?

I recently upgraded to Mac Big Sur and have noticed my Python 3.8 cron jobs have stopped working. Under my own account in a bash shell, I can run this without issues ...

davea$ cd /Users/davea/Documents/workspace/article_project; source ./venv/bin/activate; python3 manage.py check_duplicates 

In my crontab, I had this set up, which used to work before the upgrade ...

*/5 * * * * /bin/bash -l -c 'cd /Users/davea/Documents/workspace/article_project; source ./venv/bin/activate; python manage.py check_duplicates >> /Users/davea/logs/record2.txt 2>&1'

However, after the upgrade, I'm noticing my command is never run and I see this issue in my log file

/Library/Frameworks/Python.framework/Versions/3.8/bin/python3: can't open file 'manage.py': [Errno 1] Operation not permitted

These are the permissions/groups on my "manage.py" file ...

davea$ ls -al manage.py 
-rwxrwxr-x 1 davea staff 866 Apr 15  2019 manage.py

What else do I need to do to get my cron job to run again?



from How do I restore my Python cron jobs after my Mac OS upgrade?

No comments:

Post a Comment