Mark Roethof
Tera Patron
Tera Patron

Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

 

Hi there,

 

One of my Zurich release favorites: Scheduled jobs got enhanced with three new run types and two new advanced options, making scheduling a lot more flexible without needing to add some scripted tricks.
Unfortunately, these new run types are not available in Workflow Studio.

 

Let's have a closer look a the new run types.

 

Yokohama versus Zurich

Yokohama

 

01. Yokohama.png

 

Zurich

 

02. Zurich.png


New run types

On Scheduled Jobs, we are used to run types like "Daily", "Weekly", "Monthly". For a lot of cases this works fine, though at some point you will run into cases where the job should only run yearly, on specific days in a month, on a specific week in the third week of the month, etcetera. In such cases though luck, you would need to go for a workaround using scripting.

 

With the Zurich release, ServiceNow expanded the run type options. Not all situations are covered, though it does make a lot more cases achievable on scheduled jobs without going for a workaround using scripting.


Day and Month in Year

"Runs yearly on a specific day and month (for example, July 14), at a designated time."

 

03. Day in Month in Year.png


Day in Week in Month in Year

"Runs yearly on a specific day of the week in a specific week of a specific month (for example, the second Monday in October), at a designated time."

 

04. Day in Week in Month in Year.png


Week in Month

"Runs monthly during a specific week of the month (for example, the third week of each month), on designated days and at a designated time."

 

05. Week in Month.png


New run types NOT available throughout whole instance

Reading the release notes strictly, you might have read new run types available in "scheduled jobs", you might also have missed this. Fortunately the new run types are available wider than just Scheduled Script Execution [sysauto], unfortunately... the new run types are NOT available throughout the whole instance.


Scheduled Jobs

Going through "System Definition > Scheduled Jobs", the Automation Creator wizard provides three options, all of which contain the new run types.
- Automate the generation and distribution of a report [sysauto_report]
- Automatically generate something (a change, an incident, a ci, etc) from a template [sysauto_template]
- Automatically run a script of your choosing [sysauto_script]

 

Good to know, actually ALL tables extending Scheduled Script Execution have the new run types available. Out-of-the-box this concerns:
- Audit [cert_audit]
- CMDB Policy Scheduled Job [cmdb_policy_scheduled_job]
- Scheduled Process Mining Job [promin_job]
- CMDB Workspace De-duplication template schedule [sn_cmdb_ws_reconcile_duplicate_template_schedule]
- Benchmark Scheduled Script [sysauto_bm_script]
- API Stats Scheduled Script Execution [sys_api_stats_script]
- Suite Schedule [sys_atf_schedule]
- Broadcast Message [sys_broadcast_message]
- Trigger Execution [sys_flow_trigger_auto_script]
- Workflow Schedule [wf_workflow_schedule]

 

(I used "new TableUtils("sysauto").getTableExtensions()" to identify all extends of sysauto)


Schedule Item

While the release notes do mention "Scheduled Jobs", the new run types have been added in more places. For example, on Schedule Item [sys_trigger].

 

06. sys_trigger.png


Workflow Studio

Now the downfall of the new run types. As mentioned, the new run types are NOT available throughout the whole instance. One of the major locations where the new run types are not available, Workflow Studio. So when working on Flows, or the new "Scheduled triggers".


Flow

 

07. Flow Designer.png


Scheduled trigger

 

08. Flow trigger.png


Hopefully ServiceNow will introduce the new run types also in Workflow Studio on short notice!

---


And that's it actually. Hope you like it. If any questions or remarks, let me know!

 

C

If this content helped you, I would appreciate it if you hit bookmark or mark it as helpful.

 

Interested in more Articles, Blogs, Videos, Podcasts, Share projects I shared/participated in?
- Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

 

Kind regards,


Mark Roethof

Independent ServiceNow Consultant
10x ServiceNow MVP

---

LinkedIn

Comments
Shivalika
Mega Sage
Mega Sage

This was truly a very very helpful and great enhancement and thanks for pointing it out @Mark Roethof I too hope they can include it in flow designer/Workflow studio - a lot more things will become easier with that. 

SouvickA
Tera Contributor

Hi Mark,

The article is adding quality knowledge. One point to highlight . The examples can show specific day as mentioned in brackets as sample dates, it will be more easy for newbies to relate. Just a thought.

Regards,

Souvick

Version history
Last update:
3 weeks ago
Updated by:
Contributors