ICluster.AddJob Method

Adds the specified job to the cluster.

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

Usage

Syntax

'Declaration
Function AddJob ( _
    job As IJob _
) As Integer
int AddJob (
    IJob job
)
int AddJob (
    IJob^ job
)
int AddJob (
    IJob job
)
function AddJob (
    job : IJob
) : int

Parameters

  • job
    An IJob interface that identifies the job to add to the cluster.

Return Value

The identifier of the job that was added to the cluster. The identifier is unique within the cluster. 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

To get an IJob interface pointer, call the ICluster.CreateJob method. You can also call the ICluster.GetJob method or one of the list methods to get an existing job to use as a template for adding similar jobs (or the same job) 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 the job contains tasks, call the ICluster.SubmitJob method to add the job to the scheduling queue. If the job does not contain tasks, call the ICluster.AddTask method to add a task to the job before calling the SubmitJob method.

Note that you can call the SubmitJob method on a job that does not contain tasks to reserve resources for the job. 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 AddJob and SubmitJob methods, you can call the ICluster.QueueJob 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
AddJobs
CancelJob
ListJobs
QueueJobs
SubmitJobs