If you want a time-based trigger, then you specify a shortcut top run at a particular time using Shortcuts’ personal automations (i*OS).
If you want to trigger a shortcut in a non-time-based way (NFC tag tap, manual run, geo-fence, etc.) and then decide what to do based on the time, you would do it exactly as you have described.
I am a little unclear on exactly what you want. If you are triggering a Shortcut and then want different outcomes depending upon the before/after 10 o’clock, the following will accomplish that:
In case it is useful, you can shrink the shortcut a little by using a text action rather than the combo of a date and number.
The text can become show results and drop the final one as the final action is common and driven by a single step. But, beyond an example, not necessarily useful if what you want to do with the result could change.
Because it is a numeric check the additional “H” in the date formatting I believe is redundant. A single “H” should still output 0-23, the “HH” would format with a leading zero for single-digit hours.
None of these change the functionality it provides, I think it just condenses and simplifies it a little … though shorter of course isn’t always simpler
That’s just a habit I’ve tended to use: put the text in a (magic) variable and then use the variable as a building block for longer text or in the output itself. I just prefer it to potentially having a long string in a Show Result field and have tended to use it in all cases for consistency in style. I also quite like the Show Result after the If as, at a glance through the Shortcut with the If collapsed, I can see that the If is creating a text result that the Show Result is displaying. With the Show Result inside the If, collapsing the If hides everything.
It isn’t available on macOS. You would have to ask apple why.
Lingon and plists are fine. You could also use other schedules (such as that built into Keyboard Maestro), or a dedicated app like Shorter. But in terms of one being better than another, there’s probably a heavy dose of personal preference in there.
Shortcuts on iOS have “Personal Automations,”
which allow Shortcuts to be triggered at a particular
time; Shortcuts on macOS does not.
Please add Personal Automations to macOS Shortcuts.
Perhaps others would also give Apple similar feedback.
That’s actually quite different in terms of triggers! “Approaching” is a rather unusual request, but I think something viable is possible.
Keyboard Maestro is usually my goto option for triggers, but there is another app that ofers some other triggers that may be of use for you, and that’s EventScripts.
I would hope that you have security enabled to lock your Mac when you are away from it. That being the case, an unlock trigger might be a good option.
If you don’t have that (and really you should), maybe you could use the movement trigger that uses your webcam to watch for movement to get a true “approaching” trigger?