The CreatorCon Call for Content is officially open! Get started here.

With business rules Is it possible to delay the execution of the script by about 30 seconds?

SS64
Tera Contributor

With business rules Is it possible to delay the execution of the script by about 30 seconds?

20 REPLIES 20

Hi,

if you don't wish to send any parameter this should be the syntax

I assume name of your event is -> scheduled_delay

var dateTime = new GlideDateTime();
dateTime.addSeconds(30);
gs.eventQueueScheduled("scheduled_delay", current, "", "", dateTime);

Regards
Ankur

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

Thank you.

Where can I check if this syntax is successful?

Hi,

refer the links shared above in my earlier comment and also below for syntax and the ServiceNow docs

eventQueueScheduled

find_real_file.png

Regards
Ankur

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

Where is it successful?

log?

Hi,

check in event logs from left navigation and search for your event name in the name column

find_real_file.png

Regards
Ankur

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