How to Schedule Flow to Run only on Weekdays (MON-FRI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2025 10:44 PM
In ServiceNow Flow Designer, the scheduling options allow you to run flows daily, weekly, or monthly. However, there is no direct option to schedule a flow to run only on weekdays (Monday–Friday). This guide provides a simple approach to achieve this using a script step.
Steps to Implement:
1. Create a Custom Action:
Navigate to Flow Designer and create a new action.
This action does not require any inputs.
2. Add a Script Step:
Under the Inputs section, add a new Script Step.
3) Insert below script in your Script step
--------------------------------------------------------------
4) Add Output variable below the script.
5)Navigate to the Outputs section, click on Edit Outputs, and define the output variable.
6)Then Click Exit Edit Mode and use the data pill to reference the script output
------------------------------------------------------------------------------
Open your flow and add the custom action after the trigger.
Use an If condition to check the isWeekday value.
If true → Proceed with your logic (e.g., create an incident).
If false → End the flow.
Test and Validate:
Run the flow to verify that it executes only on weekdays.
This approach ensures that your flow runs exclusively from Monday to Friday, preventing unnecessary executions on weekends. Let me know if you have any challenges implementing this!
has context menu
#flow
#Scheduleflow
#weekdays