IT CanvassTalk to an advisor
How-to Guides · LessonBy , ServiceNow Trainer, 9 yrs · Published · current release · step-by-step

Schedule a job

Run a script automatically on a cron-like schedule.

Quick answer

Scheduled jobs run server-side scripts on a repeating schedule, ideal for cleanup, reminders and batch updates.

Key takeaways
  • Steps
  • Batch safely

Scheduled jobs run server-side scripts on a repeating schedule, ideal for cleanup, reminders and batch updates.

Steps

  • Open System Definition → Scheduled Jobs and click New, then Automatically run a script.
  • Set the run frequency (daily, weekly, periodically).
  • Write the script, keep it batched with setLimit().
  • Save and use Execute Now to test.

Batch safely

Never hold a long transaction. Process a limited set per run and log progress.

Try it YourselfJavaScript
▸ Press Run to execute.

Runs in a sandbox in your browser. Mock gs and GlideRecord and sample data are provided.

Quick check

+0 XPStreak ×0
Question 1 of 2
What keeps a scheduled job from locking tables?

Frequently asked questions

What does the term Schedule a job refer to in ServiceNow?
Scheduled jobs run server-side scripts on a repeating schedule, ideal for cleanup, reminders and batch updates.
What is worth remembering about Schedule a job in practice?
Open System Definition → Scheduled Jobs and click New, then Automatically run a script. Set the run frequency (daily, weekly, periodically). Save and use Execute Now to test.
Practise this on your own free instance.
Set up your free instance →
Already working on ServiceNow and stuck on a live ticket?Get an expert ServiceNow developer on screen-share to finish your daily tasks with you. Deliver on time, protect your reputation and your job. Monthly support only, no task-wise plans.Task assigned · no idea where to startStill stuck · your job on the lineExpert joins your screenDelivered on timeExplore On Job Support