ICluster.AddJobs Method

Adds one or more specified jobs to the cluster.

Namespace: Microsoft.ComputeCluster
Assembly: CcpAPI (in ccpapi.dll)

Usage

Syntax

'Declaration
Function AddJobs ( _
    jobs As IClusterEnumerable _
) As IClusterEnumerable
IClusterEnumerable AddJobs (
    IClusterEnumerable jobs
)
IClusterEnumerable^ AddJobs (
    IClusterEnumerable^ jobs
)
IClusterEnumerable AddJobs (
    IClusterEnumerable jobs
)
function AddJobs (
    jobs : IClusterEnumerable
) : IClusterEnumerable

Parameters

  • jobs
    An IClusterEnumerable interface that contains one or more IJob interfaces to the jobs that you want to add to the cluster.

Return Value

An IClusterEnumerable interface that contains a collection of integers that identify the jobs that were added to the cluster. The identifiers in this collection correspond directly to the jobs passed in the jobs parameter. Use the identifier to add tasks to the job and to submit or retrieve the job. Note that identifiers for jobs that are no longer in the cluster are reused.

Remarks

If you need to add multiple jobs to the cluster, calling this method provides better performance than calling the ICluster.AddJob method in a loop.

To create the enumerable object that contains the collection of jobs, call the ICluster.CreateClusterEnumerable method. Then, call the IClusterEnumerable.Add method for each job object that you want to add to the enumerable object.

If this method fails to add one of the jobs to the cluster, none of the jobs are added to the cluster.

To update the terms of the job after you have added the job to the cluster, you must use the ICluster.ModifyJob or ICluster.ModifyJobTerm method.

If each job contains at least one task, call the ICluster.SubmitJobs method to add the jobs to the scheduling queue. If any jobs do not contain at least one task, call the ICluster.AddTask method to add at least one task to those jobs before calling the SubmitJobs method.

Note that you can call the SubmitJobs method on jobs that do not contain tasks to reserve resources for the jobs. If the IJob.RunUntilCanceled property value is true, the job is scheduled and runs indefinitely or until it exceeds the run-time limit set in the IJob.Runtime property (then the job is canceled). If the RunUntilCanceled property value is false, the job moves to the finished status.

As an alternative to calling both the AddJobs and SubmitJobs methods, you can call the ICluster.QueueJobs method.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Microsoft Windows Compute Cluster Server 2003, Windows Server 2003, Windows XP

Target Platforms

Microsoft Windows Compute Cluster Server 2003, Windows Server 2003 with Compute Cluster Pack Client Utilities, Windows XP with Compute Cluster Pack Client Utilities

See Also

Reference

ICluster Interface
ICluster Members
Microsoft.ComputeCluster Namespace
ICluster.AddJob Method
CancelJobs
ListJobs