Settings (taskType) Element
Specifies the settings that the Task Scheduler uses to perform the task.
<xs:element name="Settings" type="settingsType" minOccurs="0" />
The Settings element is defined by the taskType complex type.
Specifies the task that is performed by the Task Scheduler service.
Specifies that the task may be terminated using TerminateProcess.
Specifies that the task can be started using either the Run command or the Context menu.
Specifies the amount of time that the Task Scheduler will wait before deleting the task after it expires.
Specifies that the task will not be started if the computer is running on batteries.
Specifies that the task is enabled. The task can be performed only when this setting is True.
Amount of time allowed to complete the task.
Specifies that the task will not be visible in the UI by default.
Specifies how the Task Scheduler performs tasks when the computer is in an idle state.
Specifies how the Task Scheduler performs tasks during Automatic maintenance.
Specifies the policy that defines how the Task Scheduler deals with multiple instances of the task.
Specifies the priority level for the task.
Specifies that the Task Scheduler will attempt to restart the task if the task fails for any reason.
Specifies that the task is run only when the computer is in an idle state.
Specifies that the Task Scheduler will run the task only when a network is available.
Specifies that the Task Scheduler can start the task at any time after its scheduled time has passed.
Specifies that the task will be stopped if the computer is going onto batteries.
Specifies if the task is automatically disabled by Task Scheduler at Windows startup.
Specifies that Task Scheduler will wake the computer when it is time to run the task.
You can select one or more of the child elements referenced above.
For C++ development, the registration information of a task is specified using the Settings property of ITaskDefinition.
For scripting development, the registration information of a task is specified using the TaskDefinition.Settings property.
The following XML code example defines a settings element that allows a hard termination of the task.
<task> <Settings> <AllowHardTerminate>true</AllowHardTerminate> <AllowStartOnDemand>true</AllowStartOnDemand> </Settings> </task>
For more information and a complete example of the XML for setting task settings, see Time Trigger Example (XML).
Minimum supported client
|Windows Vista [desktop apps only]|
Minimum supported server
|Windows Server 2008 [desktop apps only]|