Direct answer
Yes. A shortcut can be started from the command line with shortcuts run and scheduled with launchd. Newer macOS versions also have automations built into the Shortcuts app; whether you have them depends on the system version on the machine.
Basis
- macOS ships with the
shortcutscommand-line tool:shortcuts listshows the shortcuts on the machine, andshortcuts runfollowed by a name runs one of them. So anything that can run a command on a schedule can run a shortcut on a schedule. - For the scheduling layer, use a LaunchAgent in your own user folder. Put the run time and the command in it, and send the output to a log file so you can see afterwards whether each run succeeded.
- Newer macOS versions added “Automation” to the Shortcuts app, which can trigger on a time, a folder change and other conditions. Which system version your machine has is stated in the delivery notes; if you want to upgrade the system, contact support first, because an upgrade is an operation that can cut your connection.
- Shortcuts sync between devices through iCloud. They only sync to the remote Mac after you sign in with a dedicated Apple Account there; if you would rather not sign in, export the shortcut as a file and import it.
Boundaries: when the answer is different
Shortcuts that use “Ask Each Time”, a file picker or a confirmation dialog will stop at that step and wait forever when nobody is at the machine, so remove those interactions in the editor before you rely on the shortcut. Actions that control other apps trigger a system permission prompt on first run; you have to be connected to the desktop and click it yourself once, and after that it stops asking. Scheduled triggers only work once your user session is logged in, and whether the session comes back by itself after a restart depends on the login configuration the machine was delivered with. If a system update changes how an action behaves, that is not something we can guarantee against; for usage details, follow Apple's Shortcuts User Guide.
How to do it
- Connect to the desktop, run the shortcut by hand once in the Shortcuts app, and deal with every permission prompt that appears.
- Open Terminal, run
shortcuts listto confirm the name, then try the same shortcut withshortcuts run. - Create a scheduled entry under
~/Library/LaunchAgentsthat calls this command, and give it a log path. - Disconnect, wait until one trigger time has passed, then reconnect and read the log.
- Restart the machine once from the customer console and confirm the scheduled entry still works after the session logs back in.
Related questions
- iMessage, AppleScript and Shortcuts on a rented Mac mini: it runs, but Apple decides about your account
- launchd or cron: which should I use for scheduled jobs on a remote Mac?
- AppleScript vs Shortcuts vs JXA: which to use for automation on a remote Mac?
- How to keep long tasks running on a remote Mac mini after you disconnect
- Can I still connect to a remote Mac mini after it restarts?
Use case
This question belongs to the use case: iMessage, AppleScript and Shortcuts on a rented Mac mini: it runs, but Apple decides about your account
Other questions in the same use case:
- Do Automator and Folder Actions still work on a rented Mac mini?
- Without an iPhone, can a remote Mac mini handle SMS and verification codes?
- How do I tell whether a macOS app can be controlled by a script?
- Can AppleScript run JavaScript in Safari or Chrome on a remote Mac?
Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support