How do I use a schedule to trigger an AppleScript in Xojo?

Question here… I wrote an AppleScript to be triggered in Xojo when I click on a button. Got that working this morning quite nicely after three days of banging my head on my desk. LOL

I need to figure out how to also trigger the AppleScript via a timed schedule or by sunrise/sunset. Any suggestions? Thanks in advance. :slight_smile:

The easiest way would be to set a timer to trigger the action at a certain time, but your Application must be active.

An elegant way would be to use Unix Crontab to launch a Mac app at a given hour. Of course it means the machines needs to be on.

This should help:
https://www.howtogeek.com/101288/how-to-schedule-tasks-on-linux-an-introduction-to-crontab-files/