cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

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 @Anonymous 

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!


Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: How to schedule a flow every second week

Hi @Anonymous 

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!


Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

View solution in original post

Highlighted
Anonymous
Not applicable

Re: How to schedule a flow every second week

@LeeHarris  Thanks a lot, this worked

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

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

Users online (3,814)