1

I can run this in my terminal /Users/quintus/opt/anaconda3/bin/python /Users/quintus/Desktop/python/04_Jobs/Jobs.py

However, I can not set up my crontab, I type 48 23 * * * /Users/quintus/opt/anaconda3/bin/python /Users/quintus/Desktop/python/04_Jobs/Jobs.py

I read similar questions but haven't found solution.

2
  • Can you start other programs with crontab? Commented Dec 30, 2020 at 16:35
  • You're probably running into privacy protection on the /Users/quintus/Desktop/ folder (see here). There may also be problems due to the minimal environment cron jobs run with, but without troubleshooting on your part it's impossible to tell. Have you tried capturing output & errors from the job in log files? Commented Dec 30, 2020 at 20:20

1 Answer 1

1

I have not worked on my Mac in a while, but I just logged in to test this. If you try the following it might work:

48 23 * * * python3 /Users/quintus/Desktop/python/04_Jobs/Jobs.py

That would get the script to run in Python 3.x and if you want to use Python 2.x just replace python3 with python. I migh t have done something extra to get python3 command to work, but if that is the case it was much too long ago.

Also, this will run every 48 hours and 23 min. I just want to point that out because it seems very odd timing.

Sign up to request clarification or add additional context in comments.

1 Comment

At 23:48 each day I presume.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.