Event Queue Schedule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2018 06:21 AM
Hi ,
I need to trigger an event based on schedule (schedule is being defined in the 'cmn_schedule'). Can i pass the schedule name or schedule sys_id in gs.eventQueueScheduled()?
Else please provide the suggestion for scheduling an eventQueue.
Regards,
Siri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2018 09:38 AM
Hello,
You can only pass a date time as the 5th parameter in eventQueueScheduled() and it will execute the event at the specific time. You could write a schedule job and setup the required schedule in it. Refer to this link below
Using the schedule 8-5 weekdays
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2018 02:15 AM
Hi,
The event should be triggered based on record update and i can't do it through scheduled jobs. The event should be triggered only during Business hours. So, is there a way to pass Schedule as last parameter for eventScheduled() function?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2018 02:40 AM
No schedule cannot be added in gs.eventScheduled()
If it based on record update, then you need to calculate if your schedule is within current update date time in a business rule. If yes you should trigger your event.
var schedule = new GlideSchedule("090eecae0a0a0b260077e1dfa71da828"); //replace sys_id with the id of schedule
if(schedule.isInSchedule(new GlideDateTime(gs.nowDateTime()))){
gs.eventQueue("event_name", current, '', '');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2019 12:36 AM
Hello,
Is this answered? Do you have any other queries. If your query is resolved, please do mark the correct answer and close the thread