IScheduledWorkItem::SetIdleWaitIScheduledWorkItem::SetIdleWait*
*Contents  *Index  *Topic Contents
*Previous Topic: IScheduledWorkItem::SetFlags
*Next Topic: IScheduledWorkItem::SetWorkItemData

IScheduledWorkItem::SetIdleWait

HRESULT SetIdleWait(
    WORD wIdleMinutes,
    WORD wDeadlineMinutes
);

Sets the idle wait time for the task.

wIdleMinutes
Value of the task's idle wait time, in minutes.
wDeadlineMinutes
Value that specifies the maximum number of minutes to wait for the idle wait time duration contained in wIdleMinutes to occur before running the task.

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

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

See also IScheduledWorkItem::GetIdleWait, Idle Triggers

Back to top


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