How-to Guides · LessonBy Praveen T, 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.