Results 1 to 3 of 3
I have written a script, lets call it B, that calls scripts A1 to A9. I want to run the A scripts simultaneously since they can take up to 3 ...
- 02-28-2009 #1Just Joined!
- Join Date
- Feb 2009
- Posts
- 2
Running scripts in background
I have written a script, lets call it B, that calls scripts A1 to A9. I want to run the A scripts simultaneously since they can take up to 3 hrs to complete. As you might expect, I use the & to run the script in background. I am looking for a mechanism to evaluate the return code from the A scripts when they eventually complete? Does anyone have any suggestions?
- 03-08-2009 #2Content Team
- Join Date
- Dec 2008
- Location
- Evansville, IN
- Posts
- 15
While I am not a code guru, you may want to try a third script that does nothing but handle the returns. Before A1-A9 exits, they call your "status handler" script. Then based on script and error level, peforms what ever action you want.
just a thought
- 03-10-2009 #3Just Joined!
- Join Date
- Feb 2009
- Posts
- 2
3rd script to handle return codes
Thanks very much for the suggestion. I discovered the internal command 'jobs' but found it became complex and messy to parse the output in the original script. Your suggestion to use a 3rd script makes sense and could be use whenever we run script in background. Thanks again.
Jim V.


Reply With Quote