cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

Schedule flow for specific number of times

Hi Team,

 

I would like to know if there is a way to limit the schedule flow to a specific number of times. 

 

Let's say I have a flow that runs every day. I would like it to run 10 times and then stop. Please help. 

 

Thanks.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User III
Super User III

Hi!

You mean a recurrence trigger based flow?

You can store nr of executions in an external repository (excel, CDS, sharepoint list, etc)

Now, everytime your triggee is executed, first step is to read the counter from external repository, then increment its value, add a Condition action block to evaluate if new counter value is greater than 10, now on the true branch add a Terminate action block. At the bottom of the flow, just after the Condition action block, place your current logic.

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

Hi again!

There is another approach without an externañ repository. So if you know the first date your flow is to be execute, you can design your flow to calculate current date execution by means of utcNow() wdl expression, then taking start date as reference, check if current date execution is the same or any of the 9 following days.

THis second approach is better explained here

https://powerusers.microsoft.com/t5/General-Power-Automate/Flow-to-send-an-email-in-outlook-365/m-p/...

 

In this case you can even move this logic to the trigger, by means of conditional trigger functionality... so if the condition is not met flow will not be executed. GReat explanation here

https://www.timlinenterprises.com/microsoft-power-automate-flow-trigger-conditions/

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

2 REPLIES 2
Super User III
Super User III

Hi!

You mean a recurrence trigger based flow?

You can store nr of executions in an external repository (excel, CDS, sharepoint list, etc)

Now, everytime your triggee is executed, first step is to read the counter from external repository, then increment its value, add a Condition action block to evaluate if new counter value is greater than 10, now on the true branch add a Terminate action block. At the bottom of the flow, just after the Condition action block, place your current logic.

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

Hi again!

There is another approach without an externañ repository. So if you know the first date your flow is to be execute, you can design your flow to calculate current date execution by means of utcNow() wdl expression, then taking start date as reference, check if current date execution is the same or any of the 9 following days.

THis second approach is better explained here

https://powerusers.microsoft.com/t5/General-Power-Automate/Flow-to-send-an-email-in-outlook-365/m-p/...

 

In this case you can even move this logic to the trigger, by means of conditional trigger functionality... so if the condition is not met flow will not be executed. GReat explanation here

https://www.timlinenterprises.com/microsoft-power-automate-flow-trigger-conditions/

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (55,162)