Changelog
- 2025-10-31
- Combined, updated and moved to Automators Talk
- 2023-04-26
- Posted “[iOS] Making ‘Wait 100’ or ‘Wait 1000’ finish in time” (reddit.com/r/shortcuts/comments/12zegre/)
- 2022-05-28
- Posted “[iOS] Running shortcuts in the background for many hours” (reddit.com/r/shortcuts/comments/usfbb4/)
- Posted “[macOS] Running shortcuts in the background for many hours” (reddit.com/r/shortcuts/comments/usg4im/)
Shortcuts can keep running for a very long time, more than several hours or even days. Here are some exceptions:
Automation
- Runs only up to 4 minutes on iOS/iPadOS if you manually add actions (including Run Shortcut)
- Runs much longer if you select an existing shortcut to run
- For automations with special input types, see “[Shortcut] Automation Input Handlers” (talk.automators.fm/t/18680)
Siri
- Runs only up to 15 seconds
- Runs much longer if you add Dismiss Siri and Continue
iOS/iPadOS
Shortcut execution becomes slow if the screen is off for more than 10 seconds and the device is not connected to power. ‘Wait 1’ can take up to 5 minutes, for example. There are several ways to run shortcuts consistently over a long period of time:
Charge device
Shortcuts do not slow down when the device is locked if it’s charging over cable. It looks like they slow down if charging wirelessly even when Always On Display is on.
Keep screen on
The Open App or Go to Home Screen action keeps your screen on and delay the auto-lock timing. You can use the Get Current App action to avoid switching to a different app. You will need to do this at least every 19 seconds (in case auto-lock is set to 30 seconds) to prevent screen flicker.
The following shortcut keeps the screen on for 10 minutes, and you can freely switch to other apps:

Play background sounds
Playing music or background sounds prevents shortcuts from slowing down even when the screen is off and the device is not charging. You can set the background sounds volume to 0 in the beginning.
You need to run the Turn Background Sounds On action every 10 seconds, because it automatically turns off when you put on or take off your earphones.
The following shortcut runs for 30 minutes even when the screen is off:

macOS
To keep your Mac from going to sleep while running a shortcut, you can run the following command at the beginning:
/usr/bin/caffeinate -d -w $(/bin/ps -A | /usr/bin/grep 'BackgroundShortcutRunner$' | /usr/bin/awk '{print $1}' | /usr/bin/tail -n 1) &
