schedule job

LJ_23
Tera Contributor

I have a piece of development work here is the context:

Description

As an administrator I want to ensure ‘Scheduled’ change records automatically move to ‘Implement’ when Planned Start Date is reached during a ServiceNow upgrade

Acceptance Criteria

During an upgrade, a change record in a State of ‘Scheduled’ that meets the Planned Start Date/Time, will automatically move to ‘Implement’ without any manual intervention.

I have created a scheduled job - but I do not want the schedule job to run constantly I am struggling to figure out an avenue where I can enable the automated process when its needed as we have set times for upgrades

Here is a screenshot of my current scheduled job: scheduled job1.pngscheduled job2.png

Is there an alternative way to meet the acceptance criteria?

Thanks

1 REPLY 1

Kieran Anson
Kilo Patron

Hi,

Rather than a scheduled job, the below two options would offer a better solution

 

Event Driven (Pro-Code)

A scheduled event can be created which will created to run in the future. A script action can then respond to the event and update the change into the implement state. The drawback is that you'll need to add in additional logic to handle changes to the start time as well as a rollback of the state to draft to ensure the scheduled event is deleted so it doesn't erroneously run.

 

Flow (No-Code)

A flow can trigger when the state changes of the Change Request to scheduled, with a wait condition to wait until the start date. This can then update the Change Request state. Additionally, the 'in parallel' flow logic can be used to watch for changes to the state or start field to cancel the flow and re-trigger it, so it waits until the new start date