ServiceNow Scheduled Job Explained
Definition and Purpose
A scheduled job in ServiceNow is a configuration that executes a script, workflow, or automation on a recurring timetable. Unlike scheduled reports that generate data summaries and documents for human consumption, scheduled jobs perform actions that modify system state: they update records, create new entries, trigger integrations, send notifications, or run maintenance routines. They operate independently of user interaction and run in the background according to the schedule you define, executing at precise intervals regardless of whether anyone is logged in. Scheduled jobs are fundamental to automating operational processes that would otherwise require manual intervention.
Where Scheduled Jobs Live in the Platform
Scheduled jobs are configured in System Scheduler > Scheduled Jobs. Each job record contains a name, the script or workflow to execute, a frequency setting (hourly, daily, weekly, monthly, or custom CRON expression), and optional conditions for when it should execute. The system maintains a detailed execution history showing when each run occurred, how long it took, and whether it succeeded or failed. You can view output logs and debug any execution issues directly from the job’s record, which is useful for troubleshooting failed runs or understanding what the job did during each execution. The execution history is retained for audit purposes and compliance documentation.
How Scheduled Jobs Work in Practice
Consider a manufacturing team that needs to check inventory levels every night and automatically create purchase orders when stock falls below a minimum threshold. Rather than having a person run this check manually, they create a scheduled job that runs at 2am each night, queries the inventory table for all items, evaluates each item against its configured minimum stock level, and creates new purchase orders for items that have fallen below the threshold. The next morning, the procurement team finds the orders already prepared and ready to review. The job runs whether or not anyone is logged in, and the execution log documents exactly what happened each night, how many orders were created, and whether any errors occurred. This automation saves hours of manual work and reduces human error.
Scheduled Jobs Versus Other Automation Methods
Scheduled jobs are distinct from scheduled reports, which generate a document or data export for human consumption rather than performing actions. They differ from event-triggered workflows, which run whenever a record is created, updated, or a specific condition is met; a scheduled job runs on a clock, regardless of whether new records exist or changes have occurred. Scheduled jobs also differ from business rules, which run in the database during record insert or update operations. A scheduled job runs in the system context and has the privileges of the user account or service account that configured it, not the privileges of any logged-in user. Understanding these distinctions helps you choose the right automation tool.
Common Misunderstandings and Pitfalls
One frequent misconception is that scheduled jobs can only run scripts. In fact, they can execute ServiceNow workflows or flows, which offer a visual interface for defining the automation without writing code. Another misunderstanding is that scheduled jobs run only during business hours; they run 24/7 according to their defined schedule, with no regard for time zones unless your job script implements timezone-aware logic. Many administrators also assume that if a scheduled job fails, it will automatically retry; by default, it does not unless you configure retry logic within the job or set up alerting to notify someone to manually rerun it. Careful logging and error handling are essential for production jobs.
Related Concepts and Integration
Scheduled jobs often work alongside workflows and business rules to create comprehensive automation. A workflow might run when a change request is created and then schedule follow-up actions using scheduled jobs. Integration jobs for importing or exporting data use similar scheduling mechanisms. Event management systems also rely on scheduled jobs to correlate events or clean up old entries. If you are automating recurring tasks, evaluate whether you need a scheduled job, an event-triggered workflow, a business rule, or an integration process before implementing your solution. The right choice depends on whether your automation should run on a schedule or in response to events.
Choosing between a schedule, an event and a batch process
Before you create a scheduled job, decide whether the work needs a clock at all. A nightly run is the right answer when the work is genuinely periodic, such as closing stale records, rebuilding a summary table or sending a digest. It is the wrong answer when each record needs action at the moment it changes. A nightly job that updates approvals can leave a window in which the approval is out of date, and the people depending on it will lose trust in the platform long before anyone looks at the job itself.
The comparison below is the question to answer on paper before building anything.
| Question about the work | Points toward a scheduled job | Points toward something else |
|---|---|---|
| Does it need to react to a change as it happens? | No, it can wait for the next run | Yes, use a business rule or an event-driven flow |
| Does it touch many rows in a large table? | Yes, and the work can be spread across a processing window | Only a few rows change at a time, so a rule is cheaper |
| Does a late run cause harm? | No, a delay of a few hours is acceptable to the business | Yes, move the logic closer to the event that creates the need |
| Does it call an external system with rate limits? | Yes, a schedule spreads the calls out predictably | No, a direct call is simpler to monitor and retry |
Event-driven designs are a separate option, and the event rule reference describes how incoming events are processed. The trade-off between rules that run inside a transaction and jobs that run on a clock is a common design question, and the business rules governance article covers keeping server-side logic bounded and tested.
Designing the job so a second run does no harm
Scheduled jobs fail in ways that are easy to miss. A common failure is a job that partly completes, times out, and is then run again by a person who assumes it starts from the beginning. The design answer is idempotency: every run should be able to start again without creating duplicates or repeating side effects. In practice that means each processed record carries a marker, such as a field that records when it was last handled, and the selection query picks up only records that have not yet been handled for the current period.
Work through these steps before the first production schedule is turned on:
- Write down the selection query and confirm, against a copy of the data, that it returns exactly the rows you expect. Pay particular attention to records that match the query but should be excluded, such as inactive items or test records created by an integration.
- Add a dry-run mode that logs what it would change without changing anything. Run it against real data for at least one full cycle of the business process it supports.
- Bound each execution. Process a fixed maximum number of records per run and let the next run continue from the marker, so one slow run cannot hold up the rest of the platform. Confirm that the bound is set by testing how long the work takes on a realistic volume, not by guessing.
- Run the job once manually in a test environment, then run it a second time and check that the second run produces no changes.
- Only then set the schedule, choosing a time when the affected teams are not doing large bulk edits of the same records.
Keep the job’s logic readable enough that a person can check it during a review. A job that is clever about its own batching but cannot be explained in a few sentences is hard to trust during an incident, when someone needs to decide whether to stop it.
When a run looks wrong: a diagnostic table
Most support requests about scheduled jobs describe one of a small number of symptoms. The table lists what usually sits behind each one. That order is more useful than reading the whole job script from the top after a run has already produced the wrong result.
| Symptom | Usual cause | What to check first |
|---|---|---|
| The run completed but nothing changed | The selection query matches no rows, or the marker was set too far forward | Run the selection query by hand and compare the marker values with the last run time |
| Duplicate records appeared | The job is not idempotent, or two schedules run the same logic | Search the job list for overlapping jobs with similar names or similar logic |
| The run takes far longer than before | The table grew, or a new lookup runs inside a loop | Compare row counts over time, and move lookups outside the loop |
| Changes were made under the wrong identity | The job runs as an account with broader rights than the task needs | Review the run-as user and the access that account holds |
| Failures that nobody noticed | No alert is raised when a run errors | Confirm that a named team receives a notice when a run fails |
A useful habit is to write the expected outcome of each run into the job description. When a run produces a surprising result, the team can compare it with that written expectation rather than reconstructing intent from memory.
Keeping the schedule honest over time
A job that was sensible when it was written can become a liability. Volumes grow, the business process changes, and a field the job depends on is renamed in a later release. Assign an owner to each scheduled job, record what it is for in the description, and review the list whenever the process behind it changes. Retire jobs that no longer have an owner or a purpose, because an unowned job keeps running until the day it does something unexpected. A short quarterly review of the job list catches most of this before it reaches production users.
Be deliberate about who the job runs as. A service account with narrow permissions for this one task is easier to audit than a personal account that happens to hold administrator rights. Changes to the run-as user should pass through the same review as code changes, and the release that moves a job between environments should carry it with its dependencies.
Questions about scheduled jobs that come up after launch
Should a scheduled job send notifications to users?
It can, but notifications from batch runs can be a frequent source of complaints. Send a single summary to the owning team rather than one message per record, and include the marker value and the number of records changed, so the owner can tell whether the run did anything at all.
Can one job handle several different business processes?
It is possible, but separate jobs are easier to pause, test and roll back. When one branch fails, the others keep running and the run history reads clearly. Combine processes only when they must share a single pass over the same data.
What is the safest way to pause a job during an incident?
Deactivate the job rather than deleting it, and write the reason in the job description. Deleting removes the history an investigator will want, and a deactivated job can be reinstated without rebuilding its configuration.
Does a scheduled job need a rollback plan?
Yes, for any job that changes data in bulk. Record the previous values or the identifiers of changed rows during each run, so a bad run can be reversed with a targeted update instead of a restore from backup.
Comparing a nightly job with an event-driven design is easier when your own volumes are in front of you.
Related guides: ServiceNow Update Sets and Release Management: Guides and Services.
Frequently asked questions
Can I run a scheduled job immediately instead of waiting for its schedule?
Yes. In the Scheduled Jobs table, open the job record and click 'Execute Now' or use the right-click context menu to trigger an immediate execution. The job runs using its configured script but does not affect its normal schedule.
What happens if a scheduled job fails?
The job's execution history shows failure status and error details. Check the output log in the job record to see error messages. The job will attempt to run again at its next scheduled time unless you disable it or modify the schedule.
Can a scheduled job call external applications or APIs?
Yes, if your job script uses an outbound REST call, SOAP integration, or web service invocation. The job runs with the same access restrictions as the user account or service account that created it.
Related guides
Related Oblytech services
Where this topic turns into delivery work, these are the Oblytech services that cover it.
Planning, running or fixing a ServiceNow programme? Tell us where you are and we will suggest a sensible next step.
Contact us