Search code examples
automationapplescript

How to run applescript at scheduled time


How can I run my apple script at a scheduled time. I want it to run every 45 minutes, but I do not know how to do this. I saved my apple script as an application. What should I do next?

Thanks

(Currently, I am using the on idle function, but is there a better way to do so?)


Solution

  • There are two ways:

    • Create a recurring event in Calendar.app which triggers the script
    • Create a launchd agent in ~/Library/LaunchAgents with the key StartInterval value 2700

    Both ways can handle standard compiled scripts (.scpt or .scptd)