ISchedulerJob::AddExcludedNodes method

Adds the specified nodes to the list of nodes that should not be used for the job.


HRESULT AddExcludedNodes(
  [in] IStringCollection *NodeNames


  • NodeNames [in]
    An IStringCollection interface that specifies the names of the nodes that you want to add to the list of nodes on which the job should not run.

Return value

If the method succeeds, the return value is S_OK. Otherwise, the return value is an error value.


If you add a node to the list of nodes that should not be used for the job while the job is running on that node, the tasks in the job that are running on the node are canceled and then requeued if the ISchedulerTask::IsRerunnable property for the task is VARIANT_TRUE.

If a node is specified in the ISchedulerTask::RequiredNodes property for any of the tasks in the job, an exception occurs if you also specify that node when you call the ISchedulerJob::AddExcludedNodes method.

If you call ISchedulerJob::AddExcludedNodes and specify a set of nodes that would cause the set of available resources to become smaller than the minimum number of resources that the job requires, an exception occurs. For example, if you have an HPC cluster than consists of three nodes and you include two of them in the NodeNames parameter when you call ISchedulerJob::AddExcludedNodes, that action makes only one node available, and an exception occurs if the job requires a minimum of two nodes.

If you specify the name of a node that does not currently belong to the HPC cluster, the method generates an exception.

If you add the same node twice to the list of nodes that should not be used for the job, the second time that you add the node has no effect.

To verify that the method succeeded, use the ISchedulerJob:ExcludedNodes property to get the full list of nodes that should not be used for the job.



HPC Pack 2008 R2 Client Utilities

Type library


See also