Thanks, Stephen. I really appreciate that. I suspect a UI will come in a future update.
Out of interest what do you find the most reliable tool for scheduling this kind of script on an always-on Mac? I have tried various and have found Keyboard Maestro the most reliable.
The other one I got on with was LaunchControl which is a UI for launchd. But I found relying on the launchd to trigger things just failed too often.
I also use Keyboard Maestro as it is very convenient to maintain as well as most of my scheduled automations are already in that app to begin with. I have a per Mac macro group specifically for scheduled actions to further make schedules easier to review than hunting them out across multiple groups.
As noted above, you can trigger it from the command line. Shortcuts has a command line option (above), and Keyboard Maestro can run command line scripts. So you just do it as you would for any other command line scripting call.
If I had to run a Keyboard Maestro automation from a Shortcut, I’d probably use the macro’s URL trigger.
For running tasks at specific times the simplest way (for me) is to put them into cron, but I am already familiar with corn and its limitations, so it might not be the best tool for others. There is also the LaunchAgent / LaunchDaemon plist files which have their own set of features and limitations (overall, I would say cron is less capable).
Don’t forget cron was also deprecated by Apple back in Tiger (OS 10.4); so that’s over a decade and a half ago. Cron is a great tool to know, and even use on *nix platforms, but given its status, I don’t think anyone looking for a scheduler for macOS should start with cron
True, but it will be quite difficult for them to actually remove it, and it will break a lot of things if they do. I look on this deprecation status as more of a “We’d really rather you used LaunchAgents, mkay?"
In case it is of use to you, or others, I recently created a Keyboard Maestro plugin for running shortcuts that hopefully makes it a little bit more user friendly in terms of use and ongoing maintainenance.