cancel
Showing results for
Did you mean:

## Do Until 101

Hello,

I am trying to understand really how the Do until works. I am very confused about the limits and people have just thrown out numbers and I would like to know what they really mean.

I have a task that is waiting on a task to be completed. I am getting many flows that just continue because they time out from what I find.

Count = The number of times the Do until runs right?

Timeout = What do the letters mean? What do the numbers mean? How do you get the best result and not have a time out if the flow has not run for more than 30 days?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User

Do until-

Count means number of times it will iterate until condition match. Suppose you set count 100 and if condition  matches at count 65 then do until will come out of the loop in 65 counts.

Time: for 30 day (max) use P30D. this is maximum time you can run you loop. PT24H means for 24 hours here T represents Hour, Minute etc.

Delay : it is used for to set some delay in round so that DO until does not finish your all counts immediately.

Logic: you set time for 30 days and in that 30 days it has max count of 5000. Suppose you set time for PT1H and set count 60 with delay 1 min. it means your loop will run once in each minute until condition match. if condition does not match it will come out of the loop in 1hr with 60 rounds.

Thanks

Hardesh

4 REPLIES 4
Super User

Do until-

Count means number of times it will iterate until condition match. Suppose you set count 100 and if condition  matches at count 65 then do until will come out of the loop in 65 counts.

Time: for 30 day (max) use P30D. this is maximum time you can run you loop. PT24H means for 24 hours here T represents Hour, Minute etc.

Delay : it is used for to set some delay in round so that DO until does not finish your all counts immediately.

Logic: you set time for 30 days and in that 30 days it has max count of 5000. Suppose you set time for PT1H and set count 60 with delay 1 min. it means your loop will run once in each minute until condition match. if condition does not match it will come out of the loop in 1hr with 60 rounds.

Thanks

Hardesh

Awesome, thanks.

So you need to do a bit of math. I want this flow to run for at least 7 days. I am guessing there is a way to see if it timed out? Because I want it to run for 7 days which is 10,080 minutes and its repeating every 5 minutes I need the count to be 2016 as that how many counts there would be every 5 minutes for 7 days.

Right? Thanks for your quick response.

Super User

Yes it is correct.

Thanks

Hardesh

Thanks @Hardesh15

So for noobs like me if anyone else is having the problem that it never comes out of the loop. Make sure the par that checks the condition is in the loop and not trying to refer to a action before. That's why there is that get task part, I understand now.

Announcements

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

#### Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

#### Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (2,140)