check job status in routine without waiting for completion
Moderators: chulett, rschirm, roy
check job status in routine without waiting for completion
Hi all.
In a routine, I use a for loop to trigger parallel jobs. I would like these jobs to run in parallel instead of in sequentially.
But how can I detect the status of the jobs at the end of the routine?
I need to make sure the parallel jobs completed successfully and then finish the routine processing.
In a routine, I use a for loop to trigger parallel jobs. I would like these jobs to run in parallel instead of in sequentially.
But how can I detect the status of the jobs at the end of the routine?
I need to make sure the parallel jobs completed successfully and then finish the routine processing.
wuruimao
Re: check job status
I don't want to run DSWaitForJob every time. the jobs could run at the same time.
wuruimao
Set up (or find) a Sequence job with multiple unconnected Job Activity stages. No need to actually run it but rather examine the job control code that it generates. From what I recall, you should be able to find the code where it starts all of the jobs and then issues a single DSWaitForJob function call with a list of all of the PIDs running to wait for.
Meaning it is possible and the code for it is out there... or can be.
Meaning it is possible and the code for it is out there... or can be.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Nope, at least not via a Job Activity stage which automatically does a "wait" making them run in a serial manner. At least that's what I recall. It would provide a gate, however, and not proceed until all are complete (assuming it is set that way) but won't affect parallel versus serial in the running of the jobs coming into it.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Plus there are a number of settings that limit the actual number of jobs being kicked off by the Job Sequencer. I do not have a reference handy to help guide you just yet, but this is tunable.
Have you considered using Workload Manager to help manage your resources (available in 9.1+), while throwing out as many jobs as you can?
-T.J.
Have you considered using Workload Manager to help manage your resources (available in 9.1+), while throwing out as many jobs as you can?
-T.J.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: