I have a very simple python script that works when I execute manually. However when I set up a crontab, it finds the script but returns the error "[Errno 1] Operation not permitted".
I tried to set up a root crontab with the command
sudo crontab -e
but the same error occurs.
Here's my crontab:
* */1 * * * /usr/bin/python /absolute_path/test.py > /absolute_path/cron_log_test.log 2>&1
Edit: Everything was working great until I updated to macOS Catalina.
I was able to get my crontab (which calls python) back on track by giving /usr/sbin/cron "Full Disk Access". It's important to note that simple cron jobs were still executing, but my python based jobs were returning "Operation not permitted".
The link that andrea_grioni is on the right track, but aims at giving terminal permission to edit the crontab. This was merely a convince in my case by removing the "allow/deny" dialog. link: Here is a more appropriate link.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With