ICluster::SubmitJobs method

Adds one or more specified jobs to the scheduling queue.

Syntax

HRESULT SubmitJobs(
  [in]           IClusterEnumerable *jobIds,
  [in]           BSTR               userName,
  [in]           BSTR               password,
  [in]           VARIANT_BOOL       isConsole,
  [in, optional] long               hwndParent
);

Parameters

  • jobIds [in]
    An IClusterEnumerable interface that contains the identifiers of one or more jobs to submit. The ICluster::AddJob method returns this value. The variant type of each item in the collection is VT_I4. Set the lVal member of the variant to the identifier.

  • userName [in]
    The name of the RunAs user, in the form domain\user. 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 NULL, 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.

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

If the operation succeeds, the status of the job is JobStatus_Queued. The job moves to the JobStatus_Running state when all required resources are available and the scheduler starts the job. Tasks are started in the order in which they were added to the job, except if there is a dependency.

You can submit a job that does not contain tasks to reserve resources for the job. If the IJob::put_RunUntilCanceled method's pRetVal parameter is VARIANT_TRUE, the job is scheduled and runs indefinitely or until it exceeds the run-time limit set in the IJob::put_Runtime method (when the run-time value expires, the job is canceled). If the put_RunUntilCanceled method's pRetVal parameter is VARIANT_FALSE, the state of the job moves to the finished state.

If the method fails to submit one of the jobs, none of the jobs are submitted.

Requirements

Product

Compute Cluster Pack Client Utilities

Type library

Ccpapi.tlb

See also

ICluster

ICluster::SubmitJob

ICluster::QueueJobs