cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
chenboly
Level: Powered On

set schedule to run flow on a specific date

Hello,

 

How can i set schedule to run the flow on a specific date of the month?

for example: run the flow on 1st, 15, 16, 30 or 31 (end of month) and repeat every month?

 

Thanks,

BL

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: set schedule to run flow on a specific date

 

Hi @chenboly ,

 

You could use Recurrence as a trigger and set it to trigger once a day.

24.PNG

Then set trigger conditions to check if today is the specified date, and if so, trigger Flow.

25.PNG

@or(equals(utcNow('dd'), '01'),equals(utcNow('dd'), '15'),equals(utcNow('dd'), '16'),equals(utcNow('dd'), '30'),equals(utcNow('dd'), '31'))

 

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: set schedule to run flow on a specific date

 

Hi @chenboly ,

 

You could use Recurrence as a trigger and set it to trigger once a day.

24.PNG

Then set trigger conditions to check if today is the specified date, and if so, trigger Flow.

25.PNG

@or(equals(utcNow('dd'), '01'),equals(utcNow('dd'), '15'),equals(utcNow('dd'), '16'),equals(utcNow('dd'), '30'),equals(utcNow('dd'), '31'))

 

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Naveen_772
Level: Powered On

Re: set schedule to run flow on a specific date

 Hello @chenboly ,

 

Hope my solution will help you to solve your problem.

 

You need to trigger the flow on a daily basis and after that, you need to decide on which day you need to trigger the flow. This can be done by editing the trigger condition of the recurrence trigger block or you can define that afterward.

 

I have created a flow that will check the condition afterward.

fas2.PNG

 

First, you need to get the end date of the month using the below expression.

 
 

Exp- formatdatetime(subtractFromTime(startOfMonth(addToTime(utcNow(),1,'month')),1,'day'),'dd')

 

After that, I am using the If condition block to check whether today's date is either ('1','15','16','End of month') one of them .I am creating an array for the days you want to trigger the flow. This can be done using the expression below:

 

Exp- createArray('1','15','16',outputs('End_of_month'))

outputs('End_of_month') is output of the compose action. You need to input the name you provided for it.

 

Now we need to use contains operator to check whether today's date belongs to the required date. Exp for getting the today's date is below.

 

Exp- formatDateTime(utcNow(),'dd')

 

Like my post, if I am able to solve your problem.

 

Thanks and Regards

Naveen Gupta

Naveen_772
Level: Powered On

Re: set schedule to run flow on a specific date

 Hello @chenboly ,

 

Hope my solution will help you to solve your problem.

 

You need to trigger the flow on a daily basis and after that, you need to decide on which day you need to trigger the flow. This can be done by editing the trigger condition of the recurrence trigger block or you can define that afterward.

 

I have created a flow that will check the condition afterward.

fas2.PNG

 

First, you need to get the end date of the month using the below expression.

 
 

Exp- formatdatetime(subtractFromTime(startOfMonth(addToTime(utcNow(),1,'month')),1,'day'),'dd')

 

After that, I am using the If condition block to check whether today's date is either ('1','15','16','End of month') one of them .I am creating an array for the days you want to trigger the flow. This can be done using the expression below:

 

Exp- createArray('1','15','16',outputs('End_of_month'))

outputs('End_of_month') is output of the compose action. You need to input the name you provided for it.

 

Now we need to use contains operator to check whether today's date belongs to the required date. Exp for getting the today's date is below.

 

Exp- formatDateTime(utcNow(),'dd')

 

Like my post, if I am able to solve your problem.

 

Thanks and Regards

Naveen Gupta

chenboly
Level: Powered On

Re: set schedule to run flow on a specific date

Thanks @v-bacao-msft 

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,168)