Scheduled event execution in servicenow

Naveen Velagapu
Mega Guru

hi All,

I am thinking a scenario , where i want to process particular events to be processed at particular time and other in different time

ex: lets say all the events created in incident should be processed when at 3 to 4 and all the events created in change should be btw 5-6 ...

i.e, event should be created and it should be processed later, is there any way for that ???

i tried few options , they are not useful..

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Hi Naveen,



Yes, there is a way to do this. You can use gs.eventQueueScheduled() to trigger an event at a specific time. It looks like this:



var dt = new GlideDateTime();


gs.eventQueueScheduled("incident.event.at_2", current, "", "", dt);



No reference found.


View solution in original post

12 REPLIES 12

Hi Chuck,



Thank you for your response on this,


This Method works when we develop custom application under Scoped Application.



In Global application, when we use this function we dont have convert the reminder date into a GlideDateTime() object but in scoped application, we do have to make the conversion to get a scheduled reminder.



Naveen, thanks for opening up this discussion.



Regards,


Surendar M


If we schedule an event like this , where can we see the list of pipe lined ( scheduled to be executed in future ) events . 

I cant find it in event queue . Event queue is only showing events which have already been executed  

The event is definitely in the event queue. Check to ensure you don't have a filter on the list (you are viewing all records.)

I just sent one to the event queue using gs.eventQueueScheduled() and it's there. There is a field called "Process on" that holds the date/time from the fifth argument. When I added it to the list, I can see the time.

find_real_file.png