cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AndiRodi
Advocate II
Advocate II

Recurring flow in a specific day of week any 2 mont

Hello everyone,

 

I'd like to create a flow which send an email at 8:55 am on the first Monday of January, March, May and so on any 2 month.

I don't know how to set it with ther recurence trigger.

 

Please, do you have any advice?

 

Thanks and BR,

Andi

andi.rodi@beantech.it

2 ACCEPTED SOLUTIONS

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

I don't think there is a way to specify this in the recurrence trigger.  You could try what @ChristianAbata suggests, but that depends on getting it to trigger the first time at just the right time.

 

Instead I would set a Trigger to trigger at 8:55 every Monday and then as the first action of the flow check to see whether it is the first Monday of one of the months you want, January, March, May etc.  If its not the month you want or isn't the first Monday then terminate the flow.  If it is then continue with your processing.  This is the way I've done this kind of thing in the past.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Pstork1
Dual Super User III
Dual Super User III

You can set the Recurrence trigger to only run on Mondays, Then calculate the Day of the month using this formula

 

dayOfMonth(utcNow())

 

and get the abbreviation for the month using this formula

 

formatDateTime(utcNow(),'MMM')

 

 Then use a condition like this which checks to see if its one of the first 7 days in the month (First Monday since it only runs on Monday) and it is one of the Months wanted.  If its No then terminate, Yes Send the email

screenshot.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

7 REPLIES 7
ChristianAbata
Super User
Super User

hi@AndiRodi you could try this. 

days.PNG

 

or change for months 2.

But the secret is where you are going to start your flow then count the months or days.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Pstork1
Dual Super User III
Dual Super User III

I don't think there is a way to specify this in the recurrence trigger.  You could try what @ChristianAbata suggests, but that depends on getting it to trigger the first time at just the right time.

 

Instead I would set a Trigger to trigger at 8:55 every Monday and then as the first action of the flow check to see whether it is the first Monday of one of the months you want, January, March, May etc.  If its not the month you want or isn't the first Monday then terminate the flow.  If it is then continue with your processing.  This is the way I've done this kind of thing in the past.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

@AndiRodi Sorry but the post from @ChristianAbata won't work as it just runs the flow ever 60 days whether or not that day is a Monday. I think you will get closer to what you want with the following:
2MonthsMonday.png

 But even that isn't likely to be entirely accurate!

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

Hi @Pstork1 ,Thanks. it looks a good way, and maybe i'll try this. 

 

But i'm trouuble because i don't know how can i see if that monday is the first of the month? do i have any function? 

What i have in mind is to create a flow with daily recurrence which check at first if the first day of the month ( Triggded by startOfMonth() ) is monday (condition - dayOfWeek(currentDate)= Monday), if not terminate, else go on... but i think is not the right way, and also if it is, would be to expensive to do it daily. 

 

Please, any advice to do it?

 

Thank you,

Andi

Pstork1
Dual Super User III
Dual Super User III

You can set the Recurrence trigger to only run on Mondays, Then calculate the Day of the month using this formula

 

dayOfMonth(utcNow())

 

and get the abbreviation for the month using this formula

 

formatDateTime(utcNow(),'MMM')

 

 Then use a condition like this which checks to see if its one of the first 7 days in the month (First Monday since it only runs on Monday) and it is one of the Months wanted.  If its No then terminate, Yes Send the email

screenshot.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Many Thanks @Pstork1 . Your Advice i really think it's what i need. 

 

Do you know if there is a max time to run for a single flow? I mean, if run a flow, would be trouble to run it for one year (with delay action - every 3 monts send an email)?

 
Pstork1
Dual Super User III
Dual Super User III

There is a timeout on flow instances of 30 days.  But no particular timeout on a flow definition.  So in the case of a recurrence flow if you start one on January 1 and it is still running on January 30 it will timeout.  But a new instance would start then next Monday.  That's what recurrence triggered flows are used for.  You can create a recurring flow that will run for a year or 2 if necessary.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,248)