Scheduling AppleScript on Mac OS X Leopard
There are 2 key steps to doing this. You need to execute the script via theĀ osascript command:
osascript /path/to/mp.scpt
You now need to tell that command to be run at specified times. Pre-Leopard you could do this with crontab, but that’s not really the Mac way — now we should be using launchd.
Launchd config files can be a bit of a pain to create so use the excellent Lingon GUI instead. Here’s the sample settings to run a script every 15 minutes (click image for a larger version):
Once you have saved the file you will need to restart. Leopard will detect your launchd script when you log in and schedule it accordingly.
An alternative way is via iCal. See this article for details:
http://www.mactech.com/articles/mactech/vol.21/21.11/scriptingical/index.html
About this entry
You’re currently reading “Scheduling AppleScript on Mac OS X Leopard,” an entry on richaston.com
- Published:
- 07.17.08 / 4pm
- Category:
- Technical

No comments
Jump to comment form | comments rss [?] | trackback uri [?]