Reputation: 785
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?)
Upvotes: 7
Views: 10562
Reputation: 15432
I would set up crontab
to run the script using osascript
command. See https://betterprogramming.pub/https-medium-com-ratik96-scheduling-jobs-with-crontab-on-macos-add5a8b26c30 for example.
Because crontab
sets time in hours and minutes, I would set the Apple Script to run every 15 minutes and check in the first lines if it's the right time to start the body of the script.
Upvotes: 2
Reputation: 1071
Check out this launchd tutorial for running an AppleScript on a schedule.
Upvotes: 0
Reputation: 285079
There are two ways:
StartInterval
value 2700
Both ways can handle standard compiled scripts (.scpt or .scptd)
Upvotes: 7