Skip to main content
Known Participant
October 14, 2010
Answered

Multiple scripts running at the same time?

  • October 14, 2010
  • 1 reply
  • 519 views

Is there a way to have multiple scripts successfully running at the same time?

At the moment if I start a second script while the first one is still running, the second one completes successfully but the first one stops. This seems to be because the first one is no longer the active document once the second one opens so can't continue.

Is there another way to script things like this so that multiple can run independently at the same time? You might ask why I'd want to run two at the same time and not just wait, but i've setup an asp.net web form front end and having problems if two people click the button around the same time.

I'm guessing this isn't going to be possible and i'm going to have to look for ways of doing this in asp.net instead and somehow queue the requests so you have to wait longer if the script is already running?

Thanks,

Andy

This topic has been closed for replies.
Correct answer xbytor2
I'm guessing this isn't going to be possible and i'm going to have to look for ways of doing this in asp.net instead and somehow queue the requests so you have to wait longer if the script is already running?

This is correct. The scripting interface to PS is single-threaded so you will need to queue up requests.

1 reply

xbytor2Correct answer
Inspiring
October 14, 2010
I'm guessing this isn't going to be possible and i'm going to have to look for ways of doing this in asp.net instead and somehow queue the requests so you have to wait longer if the script is already running?

This is correct. The scripting interface to PS is single-threaded so you will need to queue up requests.

Col84Author
Known Participant
October 17, 2010

Thanks for comfirming that. I've now figured out a solution to this.