How to trigger Event through scheduled job

prasad8
Giga Expert

I have cretaed new notiification on Change_task table, I need to trigger this notification every day. for that i created one event and firing that in the notification. created one sheduled job and added in script  " gs.eventQueue('event name', ' ', ' ', ' ');" this line. but it is not triggering the event. 

can anyone suggest me on this.

2 REPLIES 2

Anil Lande
Kilo Patron

Hi,

Can you please complete script?

Also you have to pass first two parameters ie. EventName and GR object

  gs.eventQueue('your event name', current, ' ', ' ');"  // pass current or sc_taskGR GlideRecord object

 

Thanks,

Anil Lande

Not applicable

HI Prasad,

Current won't work for scheduled jobs.

First create a event and process that one with below syntax

Use the gs.eventQueue('eventname',object(generally table name),'parm1','parm2');

Or

gs.eventQueue('event name',gliderecord object,'recipient-list');

You can refer to this thread as well for an example :

https://community.servicenow.com/community?id=community_question&sys_id=d595c7eddbd8dbc01dcaf3231f96... 

Mark my answer correct & Helpful, if Applicable.

Thanks,
Sandeep