Showing results for 
Search instead for 
Did you mean: 
New Member

Schedule Flow After Hours


We have an application called pagerduty that we use to setup our After-hours alerts. Basically, when we receive an email after-hours it has to be forwarded to a pagerduty email (pagerduty takes care of the alerts after it recieves the email).

As of now, I want to trigger a scheduled flow with 1-minute recurrence. Let's call it After-hours flow.
So this After-hours flow checks for any incoming new emails every 1 minute that we receive and then forward them to pagerduty email. But this flow should only be functioning only after-hours. Now, my problem is to make this 1-minute recurrence flow stop working during business hours (monday-friday 8:30AM to 5:30PM). I'm thinking if there is another flow that I can setup to stop and start this "After-hours" flow based on business hours schedule. 

Solution Sage
Solution Sage

Hi @harish ,

I suggest you add a condition after the 'when a new email arrivers'.

 I have made a test on my side, please take a try with the following workaround:

The Compose action is to get the Received Time of email:


The expressions in Condition are:


dayOfWeek(triggerBody()?['DateTimeReceived'])  is equal to 0, Indicates that the time is Sunday.
dayOfWeek(triggerBody()?['DateTimeReceived']) is equal to 6, Indicates that the time is Saturday.
3 and 4
greaterOrEquals(outputs('Compose'),'08:30:00')  is equal to false
lessOrEquals(outputs('Compose'),'17:30:00') is equal to false 


Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

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