how to stop Scheduled jobs getting run using inactive user profile

Vineela1
Tera Contributor

Hi Team,

Scheduled Jobs getting run by inactive user as created by user is inactive when scheduled job is getting run.

Please suggest inputs how to avoid this.

As client project security issues , they don't want to run scheduled jobs if created user is inactive.

 

 

Regards,

Vineela

 

 

 

14 REPLIES 14

So rather than deactivating the jobs you can swap run as with a different admin user? 

-Anurag

Wind0004
Mega Guru

Hi Vineela, 

The scheduled jobs are run as the user in the "Run As" field on a schedule job. This field is not on the form "OOTB", so you may need to add it to the form , or change it via the list view.

It is usually best practice to have these run as "System Admin". Usually from my experience schedule jobs would not run if the user is inactive. However, I would just recommend you change the "Run As" field for the relevant jobs. 

 

Hope that answers your query.

 

Regards,

Wind

Ankur Bawiskar
Tera Patron
Tera Patron

@Vineela1 

Always run scheduled job as System Administrator. So please update the Run as User with System Administrator

This user will never get de-activated.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar ,

As per Client security restrictions we cannot Run as System administrator as default one. on requirement basis only they will give admin privileges.

Please suggest inputs how we can stop this scheduled jobs if created user is inactive.

I have created a scheduled job for testing and tried with "Run as" is  blank. still it is running without any issue.

@Vineela1 

why to stop scheduled job?

Ideally the user who is present in Run as should be Active

The only user which can be relied upon is System Administrator

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader