- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2021 07:09 AM
Dear Experts,
I am trying to set an email notification.
Send an Email if the KB article is going to retire in the next 7 days. Even though I have three KB articles expiring in 7 days I email did not trigger.
Please help!
Thank you..
Is my condition correct?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2021 06:01 AM
Hi,
I just wanted to check-in on this and see if my reply above helped recap everything and guide you Correctly.
If so, please mark my above reply as Correct.
Thanks! 🙂
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2021 08:50 AM
You are absolutely correct. Thank you for your encouragement.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2021 09:00 AM
Great
Let me know if I can assist any further.
If one of my replies above helped also guide you Correctly, please mark it as Correct so that others can quickly jump to that information if they have a similar question.
Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2021 07:27 AM
1) Create event by going to System Policy > Registry,
2) Then go to System Notification > Notifications and create a new notification. On the first tab, "when to send": choose "Event is Fired" then select your event
3) In who will receive, Configure as per your requirement.
4) Create a new scheduled job. Make Configure it to run daily
refer below code
var gr = new GlideRecord('kb_knowledge');
gr.query();
while(gr.next())
{
var exp = new GlideDateTime(gr.exp_date).getDate(); //exp_date as Article Expiry Date
if(exp.addDaysUTC(7)==new GlideDateTime().getDate())
{
gs.eventQueue('your_event_name',gr,gs.getUser()); //add the recepients according to your requirement
}
}
Regards
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2021 08:14 AM
I will create an event and schedule a job and see how that will go and let you know.
Thank you Again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2021 08:16 AM
YESS!!