ITaskSettings::IdleSettings property
Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, see Task Idle Conditions.
This property is read/write.
Syntax
HRESULT put_IdleSettings(
[in] IIdleSettings *pIdleSettings
);
HRESULT get_IdleSettings(
[out] IIdleSettings **ppIdleSettings
);
Property value
An IIdleSettings interface that specifies how the Task Scheduler handles the task when the computer switches to an idle state.
Error codes
| Name | Meaning |
|---|---|
|
The property value was successfully set or retrieved. |
Remarks
When reading or writing XML for a task, this setting is specified in the IdleSettings element of the Task Scheduler schema.
When battery saver is on, Windows Task Scheduler tasks are triggered only if the task is:
- Not set to Start the task only if the computer is idle... (task doesn't use IdleSettings)
- Not set to run during automatic maintenance (task doesn't use MaintenanceSettings)
- Is set to Run only when user is logged on (task LogonType is TASK_LOGON_INTERACTIVE_TOKEN or TASK_LOGON_GROUP)
All other triggers are delayed until battery saver is off. For more information about accessing battery saver status in your application, see SYSTEM_POWER_STATUS. For general information about battery saver, see battery saver (in the hardware component guidelines).
Requirements
|
Minimum supported client |
Windows Vista [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also