Share via


ISchedulerJob::SetHoldUntil method

Sets the earliest date and time until which the HPC Job Scheduler Service should wait until before starting the job.

Syntax

HRESULT SetHoldUntil(
  [in] DATE *holdUntil
);

Parameters

  • holdUntil [in]
    Specifies the earlier date and time in the local time zone until which the HPC Job Scheduler Service should wait before running the job. The date and time must be in the future.

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, access the ISchedulerJob::ErrorMessage property.

Remarks

The HPC Job Scheduler Service only runs the job at the date and time that you specify in the holdUntil parameter if the resources needed for the job are available. If the resources needed for the job are not available at that date and time, the job remains queued until the necessary resources become available.

You can only call this method once you submit the job and it is waiting in the queue. While the job is on hold, HPC Cluster Manager displays the following message for the job:

The job is pending: This job is being held by the administrator.

To unset the date and time that the HPC Job Scheduler Service should wait until before running the job, which removes the hold on the job and allows it to run, call the ISchedulerJob::ClearHold method.

Requirements

Product

This method was introduced in Windows HPC Server 2008 R2 and is not supported in previous versions.

Type library

Microsoft.Hpc.Scheduler.tlb

See also

ISchedulerJob

ISchedulerJob::ClearHold

ISchedulerTask