- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2022 05:01 PM
I need to set up an email remainder for 5 groups for their respective Open cases. Any suggestions how to achieve this?
Email remainder should have (May be in ONE Email)
List of all the Open Cases at the 90 day mark
List of all the open cases - at the 120th day mark
List of all the open cases - at the 150th day mark
List of all the open cases - at the 180th day mark
The Managers should be receiving weekly these remainders.
These email reminder for any cases not in “closed” or “delete” status
Starting from the created date to 90th day and so on
Need to set this up to 4 different groups (example, HR, Finance, InfoSec..etc)
I read many articles which are similar to this. Looks like I need to set up an event registry, Notification, schedule job etc.
But I still don't know how to do this.
Since, I need to setup for 4 groups and list all the open cases for 4 scenarios, Not too sure, how to calculate this and
Achieve the same? Do I need to setup 5 schedule jobs for 5 groups? Any help would be greatly appreciated.
Thank you
Shubha
Solved! Go to Solution.
- Labels:
-
Security Incident Response

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2022 06:21 PM
Hi ,
1. Create 4 events (example case.90.day, case.120.day )
2. Create 4 Scheduled jobs / Flow designer (trigger event from job/flow)
3. Create 4 notifications which will be called by events to send notifications
Sample Scheduled job script:
You can test this in background script
var createdDate = '';
var today = new GlideDateTime();
var today_date = today.getDate();
var gr = new GlideRecord('tablename');
gr.addActiveQuery();
gr.addQuery('state', '4');// open case
gr.query();
while (gr.next()) {
createdDate = new GlideDateTime(gr.getValue('sys_created_on')); // created field
createdDate = createdDate.getDate();
var dur = GlideDateTime.subtract(createdDate, today_date).getRoundedDayPart(); // subtract today date - created date
if (dur == 90) { // 90 days
gs.info("INC"+gr.number);
gs.eventQueue("eventname", gr,"","" ));
}
}
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2022 06:21 PM
Hi ,
1. Create 4 events (example case.90.day, case.120.day )
2. Create 4 Scheduled jobs / Flow designer (trigger event from job/flow)
3. Create 4 notifications which will be called by events to send notifications
Sample Scheduled job script:
You can test this in background script
var createdDate = '';
var today = new GlideDateTime();
var today_date = today.getDate();
var gr = new GlideRecord('tablename');
gr.addActiveQuery();
gr.addQuery('state', '4');// open case
gr.query();
while (gr.next()) {
createdDate = new GlideDateTime(gr.getValue('sys_created_on')); // created field
createdDate = createdDate.getDate();
var dur = GlideDateTime.subtract(createdDate, today_date).getRoundedDayPart(); // subtract today date - created date
if (dur == 90) { // 90 days
gs.info("INC"+gr.number);
gs.eventQueue("eventname", gr,"","" ));
}
}
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2022 08:33 PM
Thank you so much Harish. This is very helpful. So, this would list all the incidents (say there are 11 of them) which are open at that time? How would I include the list in the email(Notification?)
Thanks again
Shubha

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2022 08:38 PM
Hi use schedule job to fire the event and Notification on 90th ,120 days. Have 4 Notification email scripts with same scheduled job script to send the case details.
Follow the steps here
https://community.servicenow.com/community?id=community_question&sys_id=9f9173c9db1f6850da1999ead3961916
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2022 01:51 PM
Thank you so much for your help. Really appreciated your time to answer my questions. It is working for me now. Thanks a lot!!
Shubha