3 ms·
> Regarding trigger i meant there is no standard scheduled system like a cronjob Do you have a Mac? If so maybe you could run your shortcut periodically from c
by tzs 4y ago
> Regarding trigger i meant there is no standard scheduled system like a cronjob
Do you have a Mac? If so maybe you could run your shortcut periodically from cron on the Mac.
I just tested and shortcuts can be run from cron (once you get cron working...[1]). For example I have a bunch of shortcuts that do things to my Denon A/V receiver, and added a crontab entry to run the one that mutes the receiver, and it worked. You can invoke shortcuts with the "shortcuts" command. E.g., here was my mute test's crontab line:
*/1 * * * * shortcuts "Denon Mute On"
That doesn't involve interacting with any GUI apps (it just uses the "Run script over SSH" shortcut action to run a script that is on my RPi that does the actual work of dealing with the Denon receiver's network API). To check that dealing with GUI apps was OK from cron I tried another shortcut I have, "SaveInnerHTML" that saves document.documentElement.innerHTML from the active Safari tab into a file. That worked too.
[1] Apparently sometime around Catalina, when they were beefing up the permissions system and privacy protection cron stopped working unless you gave it permissions. You apparently now have to go into the "Privacy & Security" settings and /usr/sbin/cron full disk access.