Scheduled template that generates a change on the third Tuesday of every month
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-15-2024 05:47 AM
Hi - We are looking to schedule a template that generates a change on the third Tuesday of every month with the same planned start/end times (Thursday 03:30-03:40). Scheduling the template works just fine but getting it to run on only the third week of the month and the planned start/end dates we have not been successful. Has anyone else been able to do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-15-2024 06:11 AM
Have you tried creating a schedule record and schedule entries for the 3rd Tuesday of every month?
Once you've done that you can create a scheduled job that runs on that schedule and applies your template.
Hope that helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-16-2024 05:22 AM
We have tried using sysauto_template (Scheduled Entity Generation) is this what you're referring to or something else? We've tried using this and adding code into the conditions but it's still not successful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-16-2024 06:08 AM
This is kinda what I was referring to. The code is super old because it uses Packages and I'm pretty sure there is a Glide class equivalent just not sure what it is. Basically you build a schedule with the dates you want. And then you can look up the schedule and see if a date_fields value on a record falls in that schedule. If so, do something, if not, do something else.
https://www.servicenow.com/community/developer-forum/how-to-determine-if-a-given-date-is-within-a-gi...