“My Power Automate flow is scheduled to run every day, but that includes also weekends, how can I set it up to run only on work days?”
When scheduling a flow in Power Automate, the default options are quite limited, even when switched to advanced options. If they fit your needs it’s fine, but what if you need something more complex, e.g. run the flow only on work days, from Monday to Friday? How can you tell the flow to skip the weekends?
Switch to ‘Week’ frequency
As mentioned by Ben in the comments, there’s actually an easier way. Just switch to ‘Week’ frequency and select the days when the flow should run. 🙂
More complicated alternative: add a trigger condition
Luckily, all the trigger actions in Power Automate allow you to define trigger conditions: another check if the flow should run. The first check is the trigger itself, what must happen for the flow to start? If the flow passes the first check, it’ll move to the second one – trigger condition. You can imagine the flow thinking: “the trigger event happened, but should I run or ignore it?”.
The trigger condition setting is available under the 3 dots in the trigger actions -> Settings.
At this moment there’s no dynamic content available as the condition is evaluated before the flow starts. You must type in the condition by yourself. What you want to tell the flow is: start only if it’s not Saturday or Sunday today.
dayOfWeek() expression
To find out what day of week is today, there’s an expression dayOfWeek(). You enter date as a parameter, and the function will return number of the day in the week. Starting from Sunday (=0), incrementing the number for each day until Saturday (=6). Each time the flow will trigger it’ll check the day and run only if it’s not equal to 0 or 6.
@not(equals(dayOfWeek(utcNow()),0))
@not(equals(dayOfWeek(utcNow()),6))
Using the trigger condition above, your flow scheduled to run daily will skip Saturdays and Sundays.
Summary
When you’re using scheduled flows, e.g. to send reminders, you don’t want to spam your colleagues during weekends. Power Automate doesn’t take a break, but your colleagues might prefer to work only on work days, and that’s what this post was about. Even automated flows don’t necessary need to run every day.
You can use the same approach also to schedule a flow to run only on a specific day of the week. Instead of running every day and using a condition in the flow, you can use the trigger condition and save some flow runs.
Or you can just set the frequency to week instead of days and choose the days you want :D.
Hello Ben,
that’s a good point, I overlooked that option. It’s much better than messing with the trigger conditions, thank you, I’ll have to update the post. 🙂
Tom
Hi, thanks for this blogpost. How can we solve this when we CANNOT use a trigger that is based on Recurrence. The trigger is something else such as “when an item is created in sharepoint”.
Based on that we want to send an email every week day. Thanks for your input!
Hello LunS,
you can use the trigger condition from the article in any flow trigger.
I set my frequency, run the flow every 30 minutes from mondey to friday. How I can specify the daily shedule, like every 30 minutes, from 7 am to 5 pm, mondey to friday???
I would like to know the same thing.
We run a check every hour.
But don’t want it to run all night, every hour.
Especially not on Sunday
I figured this out.
Change the Frequency to 1 time a week.
This changes the configuration options so that you can set M-F.
It also changes so you can specify, down to the minute, what time it should be ran.
In your case, you’d specify every minute that falls on the half hour, M-F.
Cheers
Hello Aaron,
good job by figuring that out and thank you for sharing the solution.
What if you want to use the ‘delay’ function by 1 day but not have it run on weekends?
Hello Cindy,
I generally don’t like using ‘Delay’ functions anywhere, it’s much better to build another scheduled flow that’ll do the task “to be done in …”. In your case you’ll have to check the day before the delay:
– addDays(…,1) = Saturday? Delay by 3 days instead
– addDays(…,1) = Sunday? Delay by 2 days instead