Share via


Cluster.QueueJobs Method

Adds one or more jobs to the cluster and scheduling queue.

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

Usage

Syntax

'Declaration
Public Function QueueJobs ( _
    jobs As IClusterEnumerable, _
    userName As String, _
    password As String, _
    isConsole As Boolean, _
    hwndParent As Integer _
) As IClusterEnumerable
public IClusterEnumerable QueueJobs (
    IClusterEnumerable jobs,
    string userName,
    string password,
    bool isConsole,
    int hwndParent
)
public:
virtual IClusterEnumerable^ QueueJobs (
    IClusterEnumerable^ jobs, 
    String^ userName, 
    String^ password, 
    bool isConsole, 
    int hwndParent
) sealed
public final IClusterEnumerable QueueJobs (
    IClusterEnumerable jobs, 
    String userName, 
    String password, 
    boolean isConsole, 
    int hwndParent
)
public final function QueueJobs (
    jobs : IClusterEnumerable, 
    userName : String, 
    password : String, 
    isConsole : boolean, 
    hwndParent : int
) : IClusterEnumerable

Parameters

  • jobs
    A class that implements the IClusterEnumerable interface. The class contains a collection of IJob interfaces for the jobs that you want to add to the queue.
  • userName
    The name of the RunAs user under which the job will run. The name is in the form domain\username. The user name is limited to 80 Unicode characters.

    If userName is NULL, empty, or not valid, the cluster searches the calling user's credential cache for the credentials to use. If the cache contains only one credential, that credential is used. If the cache does not exist or contains multiple credentials, the user is prompted for the credentials.

  • password
    The RunAs user's password. The password is limited to 127 Unicode characters. If this parameter is NULL or empty, the method uses the cached credentials (see Cluster.SetCachedCredentials). If the credentials are not cached, the current user is prompted for the credentials. If the isConsole parameter is true, the user is prompted in the console window; otherwise, the standard credentials dialog box is used.
  • isConsole
    Set the value to true if the application is a console-mode application. Set the value to false if the application is a GUI application.
  • hwndParent
    The handle to use as the parent window for the modal credentials dialog box. If 0, HWND_DESKTOP is used. The handle is ignored if isConsole is true.

Return Value

An IClusterEnumerable interface than contains a collection of integers that identify the jobs. The identifiers in this collection correspond directly to the jobs collection passed in the jobs parameter.

Remarks

The ClusterEnumerable class implements the IClusterEnumerable interface.

If you need to add multiple jobs to the queue, calling this method provides better performance than calling the Cluster.QueueJob method in a loop.

If the method fails to add one of the jobs to the scheduling queue, none of the jobs are added to the queue.

Calling this method is the same as calling both the Cluster.AddJobs and Cluster.SubmitJobs methods.

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

Cluster Class
Cluster Members
Microsoft.ComputeCluster Namespace
Cluster.AddJobs Method
Cluster.QueueJob Method
RequeueJobs
SubmitJobs