locked
How to fail a job is a task fails RRS feed

  • Question

  • We have a job that has 3 tasks in it.  The first task is to run a parametricSweep.  The second task concatenates the output of the sweep and the third task copies the concatenated file back to a network share.  If the parametricSweep fails for any reason the other two tasks go a head a run which returns garbage since what is needed is the sweep to complete first.  Is there any way to fail the entire job if the sweep fails an not have it run the subsequence tasks in the job?
    Tuesday, February 23, 2010 1:25 PM

Answers

  • 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.

    • Marked as answer by ccrall Thursday, March 18, 2010 3:01 PM
    Tuesday, February 23, 2010 6:47 PM