IScheduledWorkItem::GetIdleWaitIScheduledWorkItem::GetIdleWait*
*



Contents  *



Index  *Topic Contents
*Previous Topic: IScheduledWorkItem::GetFlags
*Next Topic: IScheduledWorkItem::GetMostRecentRunTime

IScheduledWorkItem::GetIdleWait

HRESULT GetIdleWait(
    WORD * pwIdleMinutes,
    WORD * pwDeadlineMinutes
);

Retrieves the task's idle wait time.

pwIdleMinutes
Address of a value that contains the current task's idle wait time.
pwDeadlineMinutes
Address of a value that specifies the maximum number of minutes to wait for the idle time duration contained in pwIdleMinutes to occur before running the task.

If the task has the TASK_EVENT_TRIGGER_ON_IDLE trigger, the task runs when pwIdleMinutes have elapsed since the most recent keyboard or mouse event.

If the TASK_FLAG_START_ONLY_IF_IDLE flag is set, the task will run only after a period of pwDeadlineMinutes have elapsed with no mouse or keyboard activity. The Task Scheduler service will wait up to pwDeadlineMinutes past the scheduled start time of the task for the required pwIdleMinutes of idle time to elapse.

See also IScheduledWorkItem::SetIdleWait, Idle Triggers

Back to top


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