How to delay a notification for 10 minutes before it triggers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-29-2023 04:01 AM
As per the requirement i have created one new notification and that notification should trigger everytime when a new incident is inserted/created but it should trigger after 10 minutes of incident creation.
notification should triggers to assigned to user only.
Please sugest

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-29-2023 07:13 AM
Hi @VIKAS MISHRA ,
You can write a BR in which you can trigger an event.
Before triggering an event write gs.sleep(addseconds);
Let me know if you need more help on this.
Please mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-29-2023 08:26 AM
You can write a BR in which you can trigger an event.
Before triggering an event write
var d = new GlideDateTime(); d.addSeconds(600);
gs.eventQueue("notification name");
Please mark helpful or correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-29-2023 09:07 AM
There is a better way than those suggested so far. Not many people seem to know this so read on to find out...
Most developers are familiar with using:
eventQueue
for putting an event in the Event Queue, from which for example your Notification can can triggered when the event is created, or say a Script Action is ran when the event is created. Well eventQueue has a close cousin and his name is :
eventQueueScheduled
This enables you to pass an extra parameter 'expiration' which in my opinion is horribly named by ServiceNow and I prefer to think of it as 'process on' as you send any date/time in the future when you want to event to be processed!!! Yep good isn't it. No messing around with the dreaded gs.sleep for example š
It is documented here:
Watch this for a very detailed example of how it's done: https://youtu.be/u38C-qNZcTQ
If this proves helpful please mark as Helpful/Correct
Regards
Paul