HOW TO: Trigger an AppleScript at specific date and time

A lot of our applications are AppleScriptable. Which means that they can be controlled by AppleScripts. This brings a lot of flexibility to the software.

For example you could trigger an AppleScript automatically using the Calendar application to perform actions at specific date and time. Note that if the application you are using has a scheduling feature (such as MovieRecorder or OnTheAir Video), you should rather use it and not this method.


Create the AppleScript

The easies is probably to start with a sample script. When installing some of our applications you are given the choice to install some AppleScript samples:


These AppleScripts will be installed in the same folder as the Application:


Double click to open it, verify it and edit it so it does what you need it to do (we are not covering that part here), and then choose the menu "File  > Export...", and in the window that pops up, select where you want to export the file, and for the File Format, make sure to select "Application":


This is not mandatory, and you could use simple scripts but that proves to be more reliable when it is saved as an Application. You could also enable the "Run-only" checkbox if you don't want the application AppleScript to be editable.


Create an alert for a reminder in Calendar

Then, in the macOS Calendar application, create an event, and in the "alert" section choose "Custom":


Then in the first popup menu, choose "Open file":


In the second popup menu, choose "Other..."


Then select the AppleScript you want to execute:


And maybe set when you want the event to be triggered:


This is how your event will look like once completed:



Have more questions? Submit a request