is Script include synchronous call in schedule job?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2025 08:09 AM
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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2025 08:12 AM
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2025 08:47 AM
But it's strange that code which is below "new sn_hamp.HAMHardwareNormalization().process();" is not working at all, even logs are not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2025 07:01 PM
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2025 10:47 AM - edited ‎01-19-2025 10:47 AM
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