Event from a scheduled job is not getting triggred

vtred
Tera Contributor

Hi,

Am trying to trigger the event from a scheduled job and from there send a notification.

but when i tried yesterday it was working, when i see not - the first step - event is not getting triggred

SCHEDULED JOB:

find_real_file.png

EVENT:

find_real_file.png

NOTIFICATION:

find_real_file.png

Can someone help - am not sure what i am actually missing?

17 REPLIES 17

vtred
Tera Contributor

Thanks for the quick replies,



I changed my script to:



var gr = new GlideRecord("u_test");


gr.addQuery("u_status", "Pending");


gr.query();


while(gr.next())


  {


  gs.eventQueue('daily.scheduled.notifications', gr, gs.getUserID(), gs.getUserName());


}




1. And there are 66 records for Pending state


2. I also checked the option - "send to event creator"




Still not getting the Event logs, What could be the issue?


Run the below script in Background Script Module and see, if you are getting the results.


Also make sure, email is enable and test emails are configured to sent to you.


var gr = new GlideRecord('u_test');


gr.addQuery('u_status', 'Pending');


gr.query();


if (gr.next())


  {


  gs.addInfoMessage('Executing the event now');


  gs.eventQueue('daily.scheduled.notifications', gr, gs.getUserID(), gs.getUserName());


}



Please mark this response as correct or helpful if it assisted you with your question.

vtred
Tera Contributor

Yeah, It Worked in the Background scripts.



I got 66 entries on the event logs



But - now, all the entries are in Ready State. They are not further processed for Notifications!!


Rerun one of the event logs and check your System Log for errors. Also recheck your notification, if it is in active state.


Check the notification body or any script you have added in notification. There could be something failing there.



Please mark this response as correct or helpful if it assisted you with your question.

Event processor is async process.All events are queued in event queue and they will be processed by event processor as per created time stamp.



Do you have other events stuck in event queue?


Do you have any long running transactions which are creating many event records? You can kill long running transactionin User Administration --> All Active Transanctions.



Regards,


Sachin