How to run script include asynchronously

bonsai
Mega Sage

※Paris version

I want to execute a script created by script include multiple times in parallel.

 

I would like to call and implement the script of script include in the job schedule.

 

I haven't created a concrete script yet, but is it possible to execute scripts with the same content in parallel?

 

1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

Hi there,

If for example you have a async business rule which calls a script include, then then the script include is asynchronously.

Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

6 REPLIES 6

Mark Roethof
Tera Patron
Tera Patron

Hi there,

If for example you have a async business rule which calls a script include, then then the script include is asynchronously.

Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

thank you for your answer. I'm looking for a helpful code. I want to use the parameter passed when calling the script include as an argument on the script include side. Do you know any good example code?

Anurag Tripathi
Mega Patron
Mega Patron

Another Way would be

 

- Create an event

- Create script action which gets called when event is triggered. Add script include function call in script action.

- trigger event from scheduled job/BR whatever

 

-Anurag

-Anurag

thank you for your answer. I've tried using events and script actions, so I'm looking for another way. I don't know if it's an event queue problem, but when I ran the script multiple times in parallel, it seemed to be processed one by one. That's why I've just arrived at Script Include looking for another way.