Scheduled report should be deactivated

Community Alums
Not applicable

Hello Experts,

 

Want to Acheive the below requirement .

- If the RUN AS become inactive, the scheduled report should be deactivated and a notification need to be sent to the recipient to inform them of the situation.

-user field need to be mandatory


Thanks,
Nithya.

3 REPLIES 3

Community Alums
Not applicable

Hi @Community Alums ,

If the run as user specified for a scheduled job is locked out & inactive the job will still run. Since the user is locked out they will not be able to access the instance

 

You can test this process by following the following steps

  1. Navigate to sysauto_script.do in the filter navigator and create a scheduled script Job

    name: snctest
    active: true
    run: on demand
    script: gs.log('Confirm job is running when using an inactive user: ' + gs.getUserID());
    run as: system administrator
  2. Navigate to the [sys_user] table and set the System Administrator active flag to false
  3. Execute the job created in step 1
  4. Check the [syslog] table for a record with a message starting "Confirm job is running when using an inactive user" created today and you should find an entry. This confirms that the job was executed

Also, 

Please delete the deactivated record in the sys_trigger table
https://xxx.service-now.com/nav_to.do?uri=sys_trigger.do?sys_id=xxx 

Ref link:

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0855616

 

Community Alums
Not applicable

Hi @Community Alums ,

 

AndersBGS
Tera Patron
Tera Patron

Hi @Community Alums ,

 

Why not just set the run as, as "system administrator"? By doing this, the user will never become inactive, and the user have access to all the tables.

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

best regards

Anders

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/