Amit Gujarathi
Giga Sage

Hi All,

Hope you all are doing fine.
In this video, we will be looking into the Scheduled job in ServiceNow. We will try to understand what is scheduled job is in ServiceNow. and then we will see the practical demo for the same.
Scheduled job :
Scheduled Jobs are pre-programmed tasks that can be completed at a specified time or on a recurrent basis.

The following types of tasks can be automated:
– Automatically generate and distribute a report
– Automatically generate and schedule an entity of records, such as an incident, change item, configuration item, from a template
– Run scheduled jobs from scripts or business rules
– Scheduling at the end of the month
– Scheduling for weekdays
Scheduled job states

A scheduled job can be in any one of the following states.

Ready
Job is ready to run at the next scheduled interval.
Running
Job is in the process of carrying out a task.
Queued
Job has been added to the scheduler queue and is waiting to run.
Error
Error occurred while running the job.
Create a scheduled job
Create a scheduled job on the Schedule Job [sysauto] table.

Special cases in job schedules
Some special cases require care in job scheduling.

View a schedule item
You can view scheduled items, which are individual instances of a scheduled job, from the system scheduler.

Hope you like this video. please like follow subscribe to get the latest updates on the future videos.

Regards,
Amit Gujarathi

Comments
teeparti tarun
Tera Contributor

Hi,Amit,can you provide any 10 real time scenarios of scheduled jobs,so that it would be useful in understanding the topic better

nitinku
Tera Contributor

Hi Tarun, Do you have any use cases on scheduled jobs? If you have them, could you please share them with me? It would be very helpful for me. 

Kailash Bhange
Mega Sage

Hi Nitin,

Here are some common real-world use cases, grouped by job type:

Scheduled reports (no code)
1. Email a weekly SLA breach or aging-incident report to team managers.
2. Send a monthly change success-rate report to the CAB.

Scheduled templates (no code)
3. Create a recurring task or incident, e.g. "Monthly backup verification" on the first business day.

Scheduled script executions
4. Auto-close resolved incidents or requests after N days if your auto-close property does not cover your case (e.g. custom tables).
5. Deactivate users not in the latest HR/LDAP feed, or notify managers of users who have not logged in for 90 days.
6. Clean up or archive old data in custom tables (logs, staging/import rows).
7. Send reminders for approvals pending more than X days.
8. Reconcile data, e.g. find records with missing assignment group or CI and fix or flag them.
9. Pull data from an external system on a schedule (often via a REST Message or IntegrationHub).

Tips
- Check for an OOB option first: scheduled reports, templates, and Flow Designer flows with a scheduled trigger (daily/weekly/repeat) cover many of these without script, and flows are easier to maintain.
- Set "Run as" to a dedicated service account, not a person, so the job doesn't break when someone leaves.
- Use the Conditional checkbox to skip runs (e.g. holidays), and use encoded queries and setLimit/batching for large tables.
- Log with a clear prefix and test with "Execute Now" in a sub-prod instance first.

 

Hope this helps - please mark it helpful if it does.

Version history
Last update:
‎10-11-2022 02:29 AM
Updated by:
Contributors