- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2022 05:31 PM
Hi experts
I have a 'Date/time' field called 'Deadline'
I want to make a mechanism that when the system's time reaches the 'deadline', a notification is triggered.
the first time I did this, was with a scheduled script, but I realized that I could not use that because it requires a time to run. and that wont work since the deadline is dynamic and can be 2 hours or 2 months.
So I started to make a flow but I was not sure if I should create a sla for this or something.
what is the best approach for this configuration?
Solved! Go to Solution.
- Labels:
-
Delegated Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2022 05:48 PM
Hi Juan,
With it sounding like a notification need to go out the second the deadline passes, an SLA definition would be the best approach as it'll provide the ability to trigger a notification within a few seconds of the time passing, it'll also handle if the deadline value changes.
Create a new cmn_relative_duration based on the existing "breach on due date" replacing it with your custom field name

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2022 05:48 PM
Hi Juan,
With it sounding like a notification need to go out the second the deadline passes, an SLA definition would be the best approach as it'll provide the ability to trigger a notification within a few seconds of the time passing, it'll also handle if the deadline value changes.
Create a new cmn_relative_duration based on the existing "breach on due date" replacing it with your custom field name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2022 04:27 AM
Hello
you can try this
var dt = new GlideDateTime();
gs.eventQueueScheduled("incident.event.at_2", current, "", "", dt);
with this you can schedule an event
please mark my answer correct if it helps you