I have a foreach loop which contains a call to an Execute process task. I want the Execute process task to run once for each element in my foreach, but I need to run as many Execute process tasks as my server can handle. What is the best way to do this? Any help would be greatly appreciated.
What do you mean by "I need to run as many Execute process tasks as my server can handle?" Can you be more precise in what this means, and perhaps provide a little more context on what exactly you're trying to accomplish?|||Unfortunately, the ForEach container does not currently support parallel execution of the loops. And since the Execute Process task waits for a return value from the executable it calls, you are stuck in a sequential mode.
You can work around this by using multiple ForEach loops, and dividing your workload between them. However, this may take a bit more manual tuning. Or you migh be able to launch the process asynchronously from a script task.
|||This is a vendor api that generates the data I need for my warehouse. I have a exe that takes one parameter and populates the appropriate stage0 tables. Sometimes this api runs really fast and returns little, other times it take 20 minutes. I'd like to run as many occurences of this api as possible so as not to slow my loads.
|||This may not be an appropriate task for SSIS then. Can you call the EXE from a C# app that has a thread pool and then when all instances of the EXE have finished running, yuo can launch whatever SSIS packes need to run next?|||I've condsidered running it this way by passing an array of parms and then threading. I appreciate the response. I was just hoping there was a simplier and easier to maintain solution.
No comments:
Post a Comment