Scheduling a Shortcut to run
Is there a simple way to have a Shortcut (Shortcuts.app) run at a certain time from Mac Monterey?
Thanks
iMac Line (2012 and Later)
You can make a difference in the Apple Support Community!
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
Is there a simple way to have a Shortcut (Shortcuts.app) run at a certain time from Mac Monterey?
Thanks
iMac Line (2012 and Later)
You don't need any if statements. You can use Shortery, which is like Automations for Mac. It's on the Mac App Store here. Otherwise, you'd have to use launchd and plist files with Terminal.
I do wish Macs had Shortcut Automations like iOS and iPadOS devices, though.
You don't need any if statements. You can use Shortery, which is like Automations for Mac. It's on the Mac App Store here. Otherwise, you'd have to use launchd and plist files with Terminal.
I do wish Macs had Shortcut Automations like iOS and iPadOS devices, though.
So when you open your shortcut on MacOS, you'll be greeted with a gallery on the righthand side and it will give a list of popular functions to start your code with and one of them is the 'if' statement. The 'if' statement is used as followed:
if (variable) is (condition) (variable it will act on, in your example the time)
*your code/shortcut here*
Otherwise (this is where you put what happens to your shortcut if the time isn't (x) but you don't have to if you don't have anything planned in this action)
end if
That's all there is to it! If the picture doesn't load, that is why I added the written code to follow along with in the app.
You're mostly correct, sinomoon, but the issue is that this Shortcut will not run at that time unless you call it manually at that exact time. Shortcuts don't run in the background, and can't check for a positive boolean.
When called, the script flow would end up being like this- You call the Shortcut > Shortcut checks time > If time is 11:50 AM, runs rest of Shortcut.
If you don't call it, though- You don't call the Shortcut > Shortcut stays dormant (doesn't check time automatically)
Shortcuts have to be manually called with Siri or in the app (unless a plist file calls it automatically with Terminal). Good thinking though.
Looks good- the Name field is only the name you give to the process. It doesn't really matter what you type there.
It's worth noting that you need to have Shortery open in the background to allow it to run Shortcuts automatically. I would test it by making a Shortcut you can clearly see when it runs, then set it for at least ten minutes later to allow it to work (but don't restart). Of course, make sure you save it after doing this.
One last thing- when you installed it, it requests access to Finder. You need to allow that (if you didn't already).
Hi.
I downloaded Shortery, I have Shortcuts running and clicked Add Shortcut Trigger, with the following pic. Did not know what to put in name, if anything and rebooted Mac. Doesn't seem to work, unless I have missed something?
Sorry for not getting back sooner, but this fails to run when mac is asleep during the scheduled time. It works fine when awake.
Here is a screen sample of a shortcut that runs, but not when the mac is asleep at the "Run Shortcut at" time
Hi APPLEAL,
You can make a shortcut run at a certain time on macOS Monterey just by opening your main shortcut with the 'if' statement followed by changing the following variables to the current date. It will autofill the time and you can change it to whatever the date and time you want it to be if the preset isn't to your liking. Also, since shortcuts can sync between your compatible Apple devices when compatible and not within Automations, you can make the shortcut from your iPhone and it will be available for you when you refresh your shortcuts app on Mac.
Ah you're right! Now I miss not having Automation shortcuts on Mac since it unlocks a lot of creativity and freedom for cool little projects to show off on iPhone and mobile Apple devices like a battery check automation shortcut.
I think I got it though still testing. I had chosen a time to run the shortcut and set up the trigger and then went to the Apple menu > sleep. I don't think Shortery likes that, perhaps because it needs a bit of time to "digest" the new trigger. So I just let the mac sleep on its own (3 minutes) and seems to be working.
So many thanks for your help.
Will continue testing and hope the triggers stick !!
I don't understand, could you provide an example of a shortcut wit the "if" statement that would make the Shortcut run daily at 10pm?
Thank you
Yeah, I agree. Oh well- Maybe someday :)
Nice! Glad I could help!
Scheduling a Shortcut to run