want the flow activites to be started after a specific time

Deepika54
Tera Contributor

Hi team,

In flow designer, i want the flow activities to be started after a specific time. I have used the wait for duration logic but still it is going past that time and it is not working as expected. Kindly help.

In the below image i want my activities to start after 7.05 pm today but still it is waiting. The flow is running as system user and for system user, the timezone is IST.

 

Deepika54_0-1767620525859.png

 

 

Deepika54_1-1767620671787.png

 

Tried adding a schedule of 24*7, and tried adding 1 sec after as well in the wait for but all of those failed and the timer always says waiting.

Kindly help

 

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

@Deepika54 

it's something to do with the timezone only

what's your instance timezone?

When flow is configured to Run as System -> it takes UTC

if it's Running with User who initiated the session then it will take that user's timezone

you need to discuss with customer in which timezone the waiting has to happen

check this link and response from Hitoshi

Flow Designer - Wait for a duration of time (localised time zone) 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

when making the flow, i have made sure that run as is kept as system user.

 

I thought that system user means system admin so i have went ahead and updated the admin profile timezone as IST.

 

So is it running as UTC?

 

If we want to run the timezone as IST, what should we do in that case

@Deepika54 

Don't change any timezone

if you want to wait in IST then

-> convert GMT to IST and then wait on that converted value

link I shared has approach for local timezone

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Thank you.

Below is the code. will this work.?

 

In my catalog item, there is a field called working date which is a date type field.

My activities should only start at the specified date's 6.30 Pm (like 2026-01-05 18:30:00) it should pause till that time.

 

below is the script i have made. is it correct ?

 

var gr=new GlideRecord('sc_req_item');
gr.get('838080c42b52bed02bcbf4b9f291bf67');

var x=gr.variables.last_working_date.toString();

var y=x+' 18:30:00';

var gdt=new GlideDateTime();
gdt.setDisplayValue(y);

var timeZone = Packages.java.util.TimeZone.getTimeZone("IST");
gdt.setTZ(timeZone);
//gdt.setTZ('Asia/Kolkata');

var p=gdt.getDisplayValue();

gs.print(p);

 

is p correct?