Recurring task based on previous date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
So, I have a CMDB record that has a date field in it in the future. I want to have a task to review the record 30 days before that date. Is there a way to have a ticket be automatically generated?
(An example use of this is a certificate that expires in, say, June -- I want a ticket fired off in May that says "review/renew certificate".)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
There is a certificate management application sn_disco_certmgmt that you might be entitled to if you are already discovering certificates.
More generally a simple way to is a scheduled script execution and something like
Run: daily
var certGr = new GlideRecord("cmdb_ci"), certTask = new GlideRecord("task")
certGr.addEncodedQuery("datefieldRELATIVEGT@dayofweek@ahead@29^datefieldRELATIVELT@dayofweek@ahead@31^ORDERBYname")
certGr.query()
while (certGr.next()) {
certTask.newRecord()
certTask.insert()
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
ServiceNow provides OOTB Data Certification task but it relies on static filter and conditions
For your case you will require daily scheduled job and check today's day and that due date is 30 days apart, if yes then create a task
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hope you are doing good.
Did my reply answer your question?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
