is Script include synchronous call in schedule job?

saibharath
Tera Contributor

I want a code to run immediately it runs a OOB script include which is in schedule job, hence i have placed the code below the script include in schedule job, so I was wondering if script include call is synchronous or async ?

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@saibharath 

it's synchronous call when you call the script include from schedule job

Any line of code after the script include function invoke will run only when script include function completes it's execution

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

But it's strange that code which is below  "new sn_hamp.HAMHardwareNormalization().process();" is not working at all, even logs are not working.

@Animesh Das2 

For that you need to debug further.

I believe I answered your original question asked.

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

Animesh Das2
Mega Sage

Hi @saibharath ,

 

As @Ankur Bawiskar mentioned it is synchronous. if the code is not executing after the SI piece of code there could be some other issue. Please share your code for better understanding of the issue.

 

If this address your question, please don't forget to mark this response correct by clicking on Accept as Solution and/or Kudos.

You may mark this helpful as well if it helps you.

Thanks, 

Animesh Das