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.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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)

Posted on Jul 4, 2022 11:16 AM

Reply
Question marked as Top-ranking reply

Posted on Jul 4, 2022 11:54 AM

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.

12 replies

Jul 4, 2022 11:53 AM in response to mrokloricred37

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.

Jul 4, 2022 12:00 PM in response to sinomoon

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.

Jul 4, 2022 12:45 PM in response to mrokloricred37

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).

Jul 4, 2022 11:32 AM in response to mrokloricred37

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.

Jul 4, 2022 10:48 PM in response to -Bubba-

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 !!

Scheduling a Shortcut to run

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.