Share via


ISchedulerTask::FailJobOnFailureCount property

Retrieves or sets the number of subtasks of a critical parametric sweep or service task that must fail before the job and its tasks and subtask should stop running and the task and job should be marked as failed.

This property is read/write.

Syntax

HRESULT put_FailJobOnFailureCount(
  [in]  long value
);

HRESULT get_FailJobOnFailureCount(
  [out] long *pValue
);

Property value

Indicates the number of subtasks of a critical parametric sweep or service task that must fail before the job and its tasks and subtask should stop running and the task and job should be marked as failed.

Error codes

If the method succeeds, the return value is S_OK. Otherwise, the return value is an error code. To get a description of the error, access the ErrorMessage task property.

Remarks

You can specify a value from 1 through 1,000,000. If you specify more subtasks than the critical task contains, the job and its tasks and subtasks run to completion no matter how many subtasks fail.

If you specify a value greater than 1 for the FailJobOnFailureCount property for a task that is not a parametric sweep or service task, an error occurs.

If you specify a value for the FailJobOnFailureCount property, but also specify VARIANT_FALSE for the FailJobOnFailure property, FailJobOnFailureCount is set to 0. If you specify a value for FailJobOnFailureCount, and do not specify a value for FailJobOnFailure, FailJobOnFailure is automatically set to VARIANT_TRUE.

Requirements

Product

This property was introduced in Windows HPC Server 2008 R2 with Service Pack 1 (SP1) and is not supported in previous versions.

Type library

Microsoft.Hpc.Scheduler.tlb

See also

ISchedulerTask

FailJobOnFailure