Skip to main content

Notifications

Power Automate - Building Flows
Suggested answer

How to exclude weekends with scheduled flows using Power Automate

Posted on by 8
Hi All,
I have a requirement to schedule a Power BI report as a PPT to users every month on 15th.
Requirement is to send on 15th of every month, but if 15th is a weekend (Saturday or Sunday) , then the flow should run on the next week day, i.e., if 15th is Saturday then flow should run on 17th and if 15th is Sunday, then flow should run on 16th.
Can someone please suggest on how this can be achieved.
 
This is the current flow I have:
 
  • Suggested answer
    David_MA Profile Picture
    David_MA 7,582 on at
    How to exclude weekends with scheduled flows using Power Automate
    I think you can add the following expression as a trigger condition: or(equals(and(and(not(equals(dayOfWeek(utcNow()),0)),not(equals(dayOfWeek(utcNow()),6))), equals(int(formatDateTime(utcNow(),'dd')), 15)), and(equals(dayOfWeek(utcNow()),1), or(equals(int(formatDateTime(utcNow(),'dd')), 16), equals(int(formatDateTime(utcNow(),'dd')), 17))), true)
     
    It checks to see if the current day of the month is the 15th and that it is not a weekend (0 and 6). It then checks if it is a Monday and the date of the month is either the 16th or 17, which would be the next valid day the flow could run based on your criteria.

    It will thus either return true if the day of the month is the 15th and not a Saturday or Sunday. Or it will return true if the day of the week is a Monday (1) and it is either the 16th or 17th of the month. Since it will only return true on one of those three days, this should work.
     
    Adjust as needed and schedule your flow to run every day.
  • Suggested answer
    trice602 Profile Picture
    trice602 10,947 on at
    How to exclude weekends with scheduled flows using Power Automate
    Hi,
     
    There's a lot of ways to do this, here's the easy path.  Check if day of week is Sat, then delay 48 hours.  Copy paste, check if Sunday, delay 24 hours...
     
     
     
     
    ------------------------------------------------


    If this was helpful, please like and/or mark as a verified answer to help others find this too!


    Always glad to help! 💯💯💯💯💯

    Tom 

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     


     
  • POSPOS1 Profile Picture
    POSPOS1 8 on at
    How to exclude weekends with scheduled flows using Power Automate
     Can you please provide detailed steps in a flow on how to check if 15th is a weekday and then send out an email notification on 15th or the next week day?
  • Suggested answer
    Expiscornovus Profile Picture
    Expiscornovus 30,706 on at
    How to exclude weekends with scheduled flows using Power Automate
    You can check the day of the week to check if the 15th is Saturday and Sunday type of day. You could use an expression with the dayofWeek function to check this in a condition an add a delay action of either 1 day or 2 days.

    Tom Riha has described using a dayofWeek function in an expression (in your case you don't want to use that as a trigger condition, but in a regular condition action instead):

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,591

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,090

Leaderboard