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 Naveen,



You COULD do that, but I'm not sure why. It seems you will be rebuilding a lot of functionality that comes out of the box with gs.eventQueueScheduled().


Hello Chuck,



Can you point me to the wiki documentation for gs.eventQueueScheduled()? It seems perfect for what I need, but I'd like to see the documentation. Can't seem to find it anywhere.



Thanks,


Dan


No documentation found. I'm working on that. What I did find was examples. Here's one from an OOB script.



var dt = new GlideDateTime();


gs.eventQueueScheduled("sn_appclient.check.for.update","","","", dt);


Thanks Chuck for the quick response.



I'll use the function, but I'm concerned over the lack of documentation. I've been bitten in the past by using undocumented features that mysteriously don't show up in the next software revision.



-Dan


I suspect this one is not going anywhere since it's used in the scoped app functionality.