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

How to schedule a flow every second week

I have a flow which I uses planner and it assigns task to one of my team members.

 

I want to upgrade my flow so it can assign the task to member1 on even weeks and member2 on odd weeks.

 

My basic logic is something like this:

if(weekNumber%2 == 0)

Assign to Member1

else

Assign to Member2

 

Any help is appreciated

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: How to schedule a flow every second week

Hi @PrashantEnveros 

See if the following expression works for you. Add this as an expression in the left side of a condition action, and then set the rest to is equal to 0.

mod(int(div(dayOfYear(utcNow()),7)),2)
 
image.png
 
Currently it will just get a week number based on the number of days that have passed in the year, so you may be able to refine it further if you want to ensure the weeks start on a particular day. 
 

Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: How to schedule a flow every second week

Hi @PrashantEnveros 

See if the following expression works for you. Add this as an expression in the left side of a condition action, and then set the rest to is equal to 0.

mod(int(div(dayOfYear(utcNow()),7)),2)
 
image.png
 
Currently it will just get a week number based on the number of days that have passed in the year, so you may be able to refine it further if you want to ensure the weeks start on a particular day. 
 

Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


View solution in original post

PrashantEnveros
Level: Powered On

Re: How to schedule a flow every second week

@LeeHarris  Thanks a lot, this worked

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (6,192)