How Do I Schedule A Python Script Using Cron On Os X Catalina
So i'm trying to setup a cron job in Mac OS X Catalina 10.15.3. For some reason I can get my python script running. I setup a test job under it and that one works perfectly. * *
Solution 1:
The safest option is the put the full path to the script. For your specific case you can find it by executing which python3.
In alternative, you can add the PATH definition into your crontab, e.g.,
PATH=$PATH:/usr/local/bin:/Users/abc/path/to/pythonAlso, you could redirect the stdout and stderr to some file to have a clearer view of what's going on
* * * * * python3 /Users/eric/Dropbox/python/Print/New\ Orders/funcs.py 1>/tmp/stdout.log 2>/tmp/stderr.log
Post a Comment for "How Do I Schedule A Python Script Using Cron On Os X Catalina"