ISchedulerJob::SubmitTask method
Submits a task to the job using the task identifier to identify the task.
Syntax
HRESULT SubmitTask(
[in] ITaskId *taskId
);
Parameters
- taskId [in]
An ITaskId interface that identifies the task to add to the job.
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
You can call this method any time after the job is added to the scheduler (see IScheduler::AddJob). Before the job is added to the scheduler, you must call the ISchedulerJob::AddTask method to add tasks to the job. After the job is submitted (see IScheduler::SubmitJob), you must call this method or the SubmitTask method to add a task to the job if you want the task to run (if you call the AddTask method after the job is submitted, the task will not run until you submit the task). If you call the SubmitTaskById method, you must first call the AddTask method to get a task identifier assigned to the task.
You cannot submit a task after the job finishes.
The task will run in the order in which it was added to the job.
Requirements
Product |
HPC Pack 2008 R2 Client Utilities, HPC Pack 2008 Client Utilities |
Type library |
Microsoft.Hpc.Scheduler.tlb |