Event from a scheduled job is not getting triggred
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2017 02:29 PM
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:
EVENT:
NOTIFICATION:
Can someone help - am not sure what i am actually missing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2017 02:56 PM
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?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2017 03:00 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2017 03:22 PM
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!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2017 03:29 PM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2017 03:35 PM
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