How to debug a schedule job's script

panda1
Kilo Guru

How to use script debug in schedule job

 

1 ACCEPTED SOLUTION

Maik Skoddow
Tera Patron
Tera Patron

Hi

this is not possible for scripts which are executed in the background. 

Maik

View solution in original post

5 REPLIES 5

Sagar Pagar
Tera Patron

Hi,

Try by adding the log statements or you can try the same scripts in Background script with logs statement.

gs.log("message"); OR gs.info("message");

 

Check which results are you getting?

 

Thanks,

Sagar Pagar

The world works with ServiceNow

Maik Skoddow
Tera Patron
Tera Patron

Hi

this is not possible for scripts which are executed in the background. 

Maik

Harish KM
Kilo Patron
Kilo Patron

Hi what exactly your trying to findout?

You can use gs.info() for scoped app or global app to print the logs and go to system logs and can check whether log is printed

Refer the below

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

Regards
Harish

panda1
Kilo Guru

Thank you for your answers. I know to use log, but it's a little troublesome It seems that can't use debug