Export (0) Print
Expand All

Cluster.AddTasks Method

Adds one or more specified tasks to the specified job.


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

public IClusterEnumerable AddTasks (
	int jobId,
	IClusterEnumerable tasks
)
public final IClusterEnumerable AddTasks (
	int jobId, 
	IClusterEnumerable tasks
)
public final function AddTasks (
	jobId : int, 
	tasks : IClusterEnumerable
) : IClusterEnumerable

Parameters

jobId

The job identifier. The Cluster.AddJob method returns this value. If you have a job object that has already been added to the cluster, you can access the Job.Id property to get the identifier.

tasks

A class that implements the IClusterEnumerable interface. The class contains one or more Task objects for the tasks that you want to add to the job.

Return Value

An IClusterEnumerable interface that contains a collection of integers that identify the tasks that were added to the job. The identifiers in this collection correspond directly to the tasks passed in the tasks parameter.

If you need to add multiple tasks to a job, calling this method provides better performance than calling the Cluster.AddTask method in a loop.

To create the enumerable object that contains the collection of tasks, call the Cluster.CreateClusterEnumerable method. Then, call the ClusterEnumerable.Add method for each task that you want to add to the enumerable object.

If this method fails to add one of the tasks to the job, none of the tasks are added to the job. The likely reason for failing to add a task to a job is if resource usage or run-time requirements of the task conflict with job.

A task cannot be modified after it is added to a job.


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

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

Community Additions

ADD
Show:
© 2014 Microsoft