1

I am using OS X 10.11.5, I have a crontab file under '/tmp/crontab', in which it contains:

01 10 * * * /Users/Jhon/Desktop/somescript.scpt

When I run crontab -l I get output as no crontab for Jhon

Any suggestion what I am doing wrong here?

user3439894
  • 58,676

1 Answers1

2

Apple recommends using launchd which actually runs cron tasks for MacOS. You can still use crontab -e to edit your crontab, but if you want a one-liner:

(crontab -l 2>/dev/null; echo "01 10 * * * osascript /Users/Jhon/Desktop/somescript.scpt") | crontab - ; crontab -l

See this answer for much more useful details:

How can I configure my computer to run an AppleScript at a specific time? Caveat: without using iCal

fd0
  • 10,708