Is there an easy way to set a fixed amount of time in an automation?

I’ve tried several times to figure this out with no luck.

I have several different shortcuts that I only want to run for an hour, usually meetings or focus periods where I want DND turned on and then back off, as well as Timery timers. I realize I can have it prompt me for a length of time, and have some that do that, but it would be hugely useful if I could just build an hour into some shortcuts.

1 Like

There appear to be no timers in Shortcuts. Or anywhere else on iOS.

I want them for a different purpose: Creating a short delay - usually because a response could take a second or two.

I wonder, though, whether web browser javascript’s setTimeout(), which must surely be respected by Mobile Safari, could be commandeered for this purpose.


This will work for DND

I don’t use Timery so can’t help with setting that up.


The Wait command seems to be what you need…

Or use Wait to Return if you are leaving the Shortcut to another app and then returning.

Hope this helps.

1 Like

Thanks! I was unaware of Wait and Wait to Return.

1 Like

Just a couple of notes on this…

  • The Wait action can also take a variable as input if you long press on the number of seconds (often easier than hitting the plus button multiple times).
  • While Wait and Wait To Return are good for short delays of a few seconds, they can’t really be used for longer delays if you want to leave the Shortcuts app as iOS seems to kill the Shortcut after a couple of minutes waiting.

An alternative approach for longer delays is to split the shortcut in two and use the Schedule Shortcut action provided by Pushcut at the end of the first shortcut to schedule the second. This does, however, require you to click on a notification so is only semi-automated.

Thanks. Splitting in two means, presumably, losing some information from the first part to the second part.

Yes, that’s right.

So to give a real world example, I have a Shortcut driven daily review that I do each morning that includes the following steps.

  • Open a custom planning perspective in OmniFocus where I can see what tasks are due today and flag others that I want to accomplish today with a “today” tag
  • Return to shortcuts, retrieve the tasks that are overdue, due today or flagged “today” and allow me to selectively add these to my calendar (I typically just schedule larger tasks that are due to take 30 mins or more)

I found that if I just put a Wait to Return after the first step, the shortcut would often have been killed before I returned to do the second.

So instead I moved the second set of actions to a separate Shortcut and used the Pushcut Schedule Shortcut action to run this a couple of minutes after I’d launched my OmniFocus planning perspective. This gives a notification that you can just tap on when you’re ready to run the second shortcut.

Not perfect, but it’s the best workaround I’ve found.

1 Like

Is it possible you can share these?

Yes, happy to.

The first is relatively simple so I’ve just included a screenshot of the relevant section below.

I’ve shared the second at…

A few points to note on this…

  • It writes to a calendar named Tasks. You’ll need to change this (near the bottom of the shortcut) if you want to use a different calendar.
  • It schedules tasks to complete at their due time if due today or a default time of 4pm if not. I then go into a calendar app (I use Fantastical) to arrange these through the day.
  • It’s best to run the shortcut either from the Pushcut notification or the grid display within Shortcuts. If you run it from within the Shortcuts editor then there’s an annoying bug (in Shortcuts) that can cause it to crash when it hits the Choose from List action.

1 Like

Thanks for sharing, this is helpful. Could you briefly describe your plan perspective? Always looking for OF tips.

Thanks so much for the “add time” solution!

The wait solution I’ve seen, but it seem so tedious to put everything in seconds. Although today I did learn from @RogerDowning that it can be long-pressed, which takes some of the sting out.

1 Like

I suspect we’re drifting away from the original topic into an OmniFocus discussion here, but just to answer the question…

My Plan perspective is essentially a list of Due Soon and Available tasks, grouped and sorted by Due Date, however, there are a couple of refinements.

  • I use flags to indicate important tasks and the perspective is sorted by ”Due and Flagged" to bring these to the top of each date grouping
  • I use a “Later” tag to exclude tasks that are technically available, but that I’m not intending to work on this week and hence don’t want to see in my daily planning. I review the tasks with this tag as part of my weekly review and remove the tag from any I want to try to do in the next week. The perspective is constructed in such a way that if I forget to remove the Later tag from a task that becomes due then it will still show up.

The perspective configuration is shown below.

Thanks Roger, this is helpful.

i have a similar set up, but am always looking for tweeks that can improve it.