Try using the FailOnTaskFailure job property:
/failontaskfailure - If True, then failure of any task in the job
will cause the entire job to fail immediately
http://go.microsoft.com/fwlink/?LinkId=120724
/failontaskfailure[:{true|false}]
|
Specifies whether the HPC Job Scheduler Service should stop the job and fail the entire job immediately when a task in the job fails.
- A value of true indicates that the HPC Job Scheduler Service should stop the job and fail the entire job immediately when a task in the job fails.
- A value of false indicates that the HPC Job Scheduler Service should continue running the rest of the tasks in the job after any task in the job fails.
When you specify the /failontaskfailure parameter without a value, the job new command behaves as if you specified a value of true. If you do not specify the /failontaskfailure parameter, the job new command behaves as if you specified a value of false.
|