Use PDIs? Take our 5-minute survey to help shape the PDI roadmap.

How to exclude weekends when running a flow on weekdays?

VIKASM535239375
Kilo Sage

How to exclude weekends when running a flow on weekdays?

3 REPLIES 3

AdwaitD
Giga Contributor

Hello,
If this is a scheduled flow, you have the option to skip weekends by setting the trigger of the flow to execute on days from Monday to Friday only.
You can do this using the Flow Designer. Set the schedule to be executed once a week but only for Monday to Friday, and ensure that Saturday and Sunday are deselected.
Thank you.

Anand__99
Mega Sage

Hi @VIKASM535239375 ,

 

OOB you cannot set a trigger condition to exclude weekends.

As a workaround you can create a variable and set the current day to it.

Anand__99_0-1785945062308.png

 

Create an if condition logic to check if day of week is 6 or 7 then end the flow.

 

If my response answered your query, please mark my response as correct/helpful.

 

Thanks

Anand

Tejas Adhalrao
Kilo Sage

hi @VIKASM535239375 ,

1) open flow in flow designer 

TejasAdhalrao_0-1785945373564.png

2)  cilck on create code snippet and copy 'server' code 

TejasAdhalrao_1-1785945428035.png

3) create scheduled job  > New > Automatically run a script of your choosing 

give name ,select weekly and weekday when you have to execute 

TejasAdhalrao_2-1785945597878.png

 

paste code you have copied from floe code snippet in script section

 

4) once you save the record you can see 'execute now' button ,click on button and test

 

If this helped, please mark it as Helpful. If it resolved your issue, please mark it as the Accepted Solution.