ITask::SetMaxRunTimeITask::SetMaxRunTime*
*Contents  *Index  *Topic Contents
*Previous Topic: ITask::SetApplicationName
*Next Topic: ITask::SetParameters

ITask::SetMaxRunTime

HRESULT SetMaxRunTime(
    DWORD dwMaxRunTime
);

Sets the maximum time the task can run before terminating.

dwMaxRunTime
Value assigned as the maximum run time, in milliseconds, for the current task.

If the maximum run time is reached during the execution of a task, the Scheduling Agent first sends a WM_CLOSE message to the associated application. If the application has not exited within three minutes, TerminateProcess is run.

See also ITask::GetMaxRunTime

Back to top


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.