cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jmon
Advocate I
Advocate I

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?

jmon_0-1601484899491.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Hardesh15
Super User
Super User

@jmon 

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

View solution in original post

4 REPLIES 4
Hardesh15
Super User
Super User

@jmon 

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

@Hardesh15 

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. 

 

jmon_0-1601494426226.png

 

@jmon 

 

Yes it is correct.

 

Please accept this post as Solution if it solves your problem.

 

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. 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,196)