Export (0) Print
Expand All

ITaskSettings::WakeToRun property

Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task, and keep the computer awake until the task is completed.

This property is read/write.

Syntax


HRESULT put_WakeToRun(
  [in]   VARIANT_BOOL wake
);

HRESULT get_WakeToRun(
  [out]  VARIANT_BOOL *pWake
);

Property value

If True, the property indicates that the Task Scheduler will wake the computer when it is time to run the task, and keep the computer awake until the task is completed.

Error codes

NameMeaning
S_OK

The property value was successfully set or retrieved.

Remarks

If a task has this property set to true, and is triggered when the computer is already awake, Task Scheduler will request the computer to stay awake until the task has completed running.

When the Task Scheduler service wakes the computer to run a task, the screen may remain off even though the computer is no longer in the sleep or hibernate mode. The screen will turn on when Windows Vista detects that a user has returned to use the computer.

When reading or writing XML for a task, this setting is specified in the WakeToRun element of the Task Scheduler schema.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Taskschd.h

Library

Taskschd.lib

DLL

Taskschd.dll

See also

Task Scheduler
ITaskSettings

 

 

Community Additions

ADD
Show:
© 2014 Microsoft