Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to create recurring tickets using Scheduled Jobs

Shwetha Shenoy
Tera Expert

 

How do you create a recurring Incident Ticket which runs daily from Monday to Friday at 7 AM excluding Saturdays and Sundays?

 

In one of my recent projects, I worked on creating a recurring Incident Ticket which runs daily from Monday to Friday at 7 AM excluding Saturdays and Sundays.

 

To configure this use case we need to write a scheduled job 

Scheduled Jobs are automated work that can be performed at a specific time or on a recurring schedule. Some special cases require care in job scheduling.

 

NOTE: Scheduled Jobs are not considered customizations (based on the absence of the "update_synch" attribute on the table), and they are not captured in update sets.

 

Please find the detailed steps below:

STEP 1: Navigate to All > System Definition > Scheduled Jobs.

STEP 2: Click on New.

STEP 3: Select the appropriate type of scheduled job.

For this use case select Automatically run a script of your choosing.

 

We need to check the conditional check box and provide the logic under the Condition field in order to create a recurring Ticket which runs daily from Monday to Friday at 7 AM excluding Saturdays and Sundays.

 

ShwethaShenoy_0-1695123071790.png

 

Please find the below script to be written in Run this script field : 

 

ShwethaShenoy_1-1695123071695.png

 

This is what the end result looks like :

 

ShwethaShenoy_2-1695123071693.png

 

 

1 REPLY 1

pratiksha5
Mega Sage

Helful