I want to create an actionable local notification that runs once every workday; the action should run a shortcut/script.
How can I do this?
Does Shortcuts support this?
I think it should be possible in Scriptable using its Notification support, by scheduling five (Mo/Tu/We/Th/Fr) weekly notifications. Unfortunately the documentation is not very clear: weekday refers to “a specific day of the week”, but how does the counting work? When does the week start? (Mo/Su/…) And where does the numbering start? (0/1)
@simonbs Can you please explain? (And perhaps improve the documentation?)
One option would be to use Launch Center Pro to run a shortcut. You can set up the notification for each weekday (even in the old version). When it appears you can simply tap on it to run the shortcut.
Launch Center Pro is ideal; the latest version having more versatile scheduling options. The script would need to be triggered by a URL scheme call as you might expect.
Scriptable notifications would absolutely enable this. The days of the week I believe are the standard JavaScript ones used in getDay(), etc. I believe (Sunday = 0).
Due can also be used to produce scheduled actionable notifications in a similar way to LCP, and might be an alternative for you if you don’t have LCP.
Shortcuts doesn’t exactly have the scheduling built in, but you can view a shortcut and then Ask Siri to schedule a reminder which when the notification appears should be actionable.
I have just created the app Pushcut to solve this kind of problem for me.
You can define a notification - with shortcuts as actions - and trigger it from anywhere using a Web API.
There is a guide how to connect it to IFTTT to get a scheduled notification.
shortcuts and URLs open directly from notification actions (one app switch less)
shortcuts are “first-class citizens” (ie: very easy to set up calling them)
full flexibility through JSON interface (dynamically create actions, inputs, URLs, …)
can be triggered by anything (simple stuff through IFTTT, crazy stuff through home servers, and anything in between)
the whole thing is mainly a “DIY automation building block”, so ultimately it is about what each individual user can build with it. for me, however, the main driver was to be able to “respond” to my automation. whenever “fully automatic” does not work, maybe “semi-automatic” is better.
for example:
opening garage door automatically when coming home -> not so great
being asked: “open garage, unlock front door, or do nothing” -> much better
I have more thoughts about this, but I do not want to ramble on here.
if you have any more questions, I am happy to keep discussing though - I could talk about it all day, really ; )
I’d read the features list on the app store and web site. That’s why I was asking about how it was markedly different to the other sorts of apps that allow you to trigger Shortcuts at specific times, locations, and through external push actions.
I’ve not had time to try out the free level hands on yet, but I was just having trouble figuring out what it is that’s different to the others, and obviously the full benefit would only come with the top tier subscription. Hence I figured I’d just ask you for a comparison of peer/competitor apps to get the best insight.