Freigeben über


ICluster::QueueJob method

Adds the specified job to the cluster and scheduling queue.

Syntax

HRESULT QueueJob(
  [in]           IJob         *Job,
  [in]           BSTR         userName,
  [in]           BSTR         password,
  [in]           VARIANT_BOOL isConsole,
  [in, optional] long         hwndParent,
  [out]          long         *pRetVal
);

Parameters

  • Job [in]
    An IJob interface. To get the interface pointer, call the ICluster::CreateJob method.

  • userName [in]
    The name of the RunAs user, in the form domain\user, under which the job will run. 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 [in]
    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 ICluster::SetCachedCredentials. If the credentials are not cached, the current user is prompted for the credentials. If the isConsole parameter is VARIANT_TRUE, the user is prompted in the console window; otherwise, the standard credentials dialog box is used.

  • isConsole [in]
    Set the value to VARIANT_TRUE if the application is a console-mode application. Set the value to VARIANT_FALSE if the application is a GUI application.

  • hwndParent [in, optional]
    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 VARIANT_TRUE.

  • pRetVal [out]
    The job identifier. The identifier is unique within the cluster.

    Note that identifiers for jobs that are no longer in the cluster are reused.

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, call the ICluster::get_ErrorMessage method.

Remarks

Calling this method is the same as calling both the ICluster::AddJob and ICluster::SubmitJob methods.

Requirements

Product

Compute Cluster Pack Client Utilities

Type library

Ccpapi.tlb

See also

ICluster

ICluster::AddJob

ICluster::QueueJobs

ICluster::RequeueJob

ICluster::SubmitJob