Flow Schedule

Chandrashekar
Giga Contributor

Hello I have a requirement please do help

Requirement

Schedule a flow to run automatically every hour and another flow every 30 mins only between 8:00 AM and 10:00 PM (EST), on Monday through Friday

4 REPLIES 4

SIVASANKARIS
Giga Guru

Hi @Chandrashekar  ,

This was for your first requirement of running the flow every half an hour

SIVASANKARIS_0-1769008361755.png

if this is useful, please mark it as helpful...

GlideFather
Tera Patron

Hi @Chandrashekar ,

 

perhaps you will need more flows with the specific triggers.

 

For example - one flow running hourly, another one half-hourly, ... share what you created for a review.

 

EDIT: depending on the nature of the flow, perhaps the same behaviour can be achieved by scheduled job which might be easier to set triggers. And the flow seems to have trigger only to be triggered hourly but not to exclude the week days.

 

Try scheduled jobs:

GlideFather_0-1769009713110.png

 

GlideFather_1-1769009719283.png

 

 

_____
No AI was used in the writing of this post. Pure #GlideFather only

Dr Atul G- LNG
Tera Patron

Hi @Chandrashekar  

 

try trigger:

 

DrAtulGLNG_0-1769008955854.png

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

yashkamde
Tera Guru

Hello @Chandrashekar  ,

Yes this requirement can be done by flow designer,
Below I have shared my approach of doing this use case..

First Flow for triggering every 1 hour ->

Screenshot 2026-01-21 222105.png

If the action gives output as 'true', proceed with your further requirement.. ->
Screenshot 2026-01-21 222125.png


Custom action ->

Screenshot 2026-01-21 222151.png

 

Script ->

(function execute(inputs, outputs) {
    var today = new GlideDateTime();
    var dateOnly = today.getDate().getByFormat('yyyy-MM-dd');

    // Build start and end times for today
    var startTime = new GlideDateTime(dateOnly + ' 08:00:00');
    var endTime   = new GlideDateTime(dateOnly + ' 22:00:00');

    // Current time
    var checkTime = new GlideDateTime();

    // Get day of week (1 = Sunday, 2 = Monday, ... 7 = Saturday)
    var dayOfWeek = checkTime.getDayOfWeek();

    // Compare time AND weekday
    if (dayOfWeek >= 2 && dayOfWeek <= 6 &&   // Mon–Fri
        checkTime.getNumericValue() >= startTime.getNumericValue() &&
        checkTime.getNumericValue() <= endTime.getNumericValue()) {
        
        outputs.is_within_range = 'true';
    } else {
        outputs.is_within_range = 'false';
    }

})(inputs, outputs);

 

 

If my response helped mark as helpful and accept the solution..