you can always chain several scripts together, to ensure they run sequentially, having each one submit the next task at the end. so, instead of script A submitting task B and waiting for it, script A submits B, then B can submit C, which has the code to execute after B is complete