Best Practice for Scheduled Jobs and the RunAs field

Mark Scott1
Giga Expert

Hello Community!

Today I have a question about scheduled jobs and the RunAs field.

We have a few scheduled jobs that run to send out reports or make incidents via templates. Unfortunately, those jobs are mostly running as random users (the user who created them). We've already uncovered one instance where that user had been set to inactive and the job stopped running.

My nightmare is as follows: A person in an organization is terminated and we set their account to Inactive and a bunch of scheduled jobs stop running.

Here is the question: Does ServiceNow recommend scheduled jobs run as the system user?

  1. If so, how would we make sure that the data remains domain separated (for instance, running a report that displays all active incidents at the end of the night but only for one client)?  
  2. If not, would ServiceNow suggest creating a "Service Account" in each domain for scheduled jobs to run as? Do we have to pay a license on a "Service Account" that isn't really logging in but will need all the roles?

6 REPLIES 6

saprem_d
Giga Guru

Hi,



- Scheduled jobs which query data which is not accessible by any user should run as system (run as should be empty)


- Any scheduled report should ideally run as the user within that report's company (domain in case of domain exasperated instance) so as they extract only the data which is authorized.


- Jobs to run platform scripts (like closing an incident after x days) should always run as system.


Luiz Lucena
Mega Sage

Cannot find any documentation saying we need to have a dedicated user to run scheduled jobs.