Scheduled template that generates a change on the third Tuesday of every month

Autum
Tera Contributor

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? 

3 REPLIES 3

The Machine
Kilo Sage

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

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. 

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...