Applies to: desktop apps only
Provides the settings that the Task Scheduler service uses to perform the task.
Members
The ITaskSettings interface inherits from the IDispatch interface. ITaskSettings also has these types of members:
Properties
The ITaskSettings interface has these properties.
| Property | Access type | Description |
|
AllowDemandStart
| Read/write |
Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu.
|
|
AllowHardTerminate
| Read/write |
Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess.
|
|
Compatibility
| Read/write |
Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with.
|
|
DeleteExpiredTaskAfter
| Read/write |
Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires.
|
|
DisallowStartIfOnBatteries
| Read/write |
Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power.
|
|
Enabled
| Read/write |
Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is true.
|
|
ExecutionTimeLimit
| Read/write |
Gets or sets the amount of time that is allowed to complete the task.
|
|
Hidden
| Read/write |
Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default.
|
|
IdleSettings
| Read/write |
Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state.
|
|
MultipleInstances
| Read/write |
Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task.
|
|
NetworkSettings
| |
Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable property of ITaskSettings is true and a network propfile is specified in the NetworkSettings property, then the task will run only if the specified network profile is available.
|
|
Priority
| Read/write |
Gets or sets the priority level of the task.
|
|
RestartCount
| Read/write |
Gets or sets the number of times that the Task Scheduler will attempt to restart the task.
|
|
RestartInterval
| Read/write |
Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task.
|
|
RunOnlyIfNetworkAvailable
| Read/write |
Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available.
|
|
StartWhenAvailable
| Read/write |
Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed.
|
|
StopIfGoingOnBatteries
| Read/write |
Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power.
|
|
WakeToRun
| Read/write |
Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer before it runs the task.
|
|
XmlText
| Read/write |
Gets or sets an XML-formatted definition of the task settings.
|
Remarks
By default, a task will be stopped 72 hours after it starts to run. You can change this by changing the ExecutionTimeLimit setting.
When reading or writing XML for a task, the task settings are defined in the Settings element of the Task Scheduler schema.
Examples
For more information and a code example for this interface, see Time Trigger Example (C++).
Requirements
|
Minimum supported client
| Windows Vista |
|
Minimum supported server
| Windows Server 2008 |
|
Header
|
- Taskschd.h
|
|
Library
|
- Taskschd.lib
|
|
DLL
|
- Taskschd.dll
|
See also
-
ITaskDefinition
-
INetworkSettings
-
IIdleSettings
Send comments about this topic to Microsoft
Build date: 2/7/2012