IScheduler::DeletePool method

Deletes a pool on a cluster based on the supplied name. An exception is thrown if the pool doesn’t exist.

Syntax


HRESULT DeletePool(
  [in] BSTR         *poolName,
  [in] VARIANT_BOOL force
);

Parameters

poolName [in]

The name of the pool on the cluster that will be deleted.

force [in]

If VARIANT_TRUE, all job templates that reference the pool are moved to the default pool in addition to any jobs that use that template. After the job templates and jobs are moved to the default pool, the pool is deleted. If VARIANT_FALSE, the pool is only deleted if no job template uses that pool. If a job template is currently using the pool, an exception is thrown.

Return value

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 ISchedulerJob::ErrorMessage property.

Requirements

Product

This method was introduced in Windows HPC Server 2008 R2 Service Pack 2 (SP2) and is not supported in previous versions.

Type library

Microsoft.Hpc.Scheduler.tlb

See also

IScheduler
IScheduler::CreatePool
IScheduler::DeletePool
IScheduler::GetPoolList
IScheduler::OpenPool

 

 

Show: