settingsType Complex Type
Článek 12/11/2020
Přispěvatelé: 3
Váš názor
V tomto článku
Defines the child elements and sequencing information for the Settings (taskType) element.
<xs:complexType name="settingsType">
<xs:all>
<xs:element name="AllowStartOnDemand"
type="boolean"
default="true"
minOccurs="0"
/>
<xs:element name="RestartOnFailure"
type="restartType"
minOccurs="0"
/>
<xs:element name="MultipleInstancesPolicy"
type="multipleInstancesPolicyType"
default="IgnoreNew"
minOccurs="0"
/>
<xs:element name="DisallowStartIfOnBatteries"
type="boolean"
default="true"
minOccurs="0"
/>
<xs:element name="StopIfGoingOnBatteries"
type="boolean"
default="true"
minOccurs="0"
/>
<xs:element name="AllowHardTerminate"
type="boolean"
default="true"
minOccurs="0"
/>
<xs:element name="StartWhenAvailable"
type="boolean"
default="false"
minOccurs="0"
/>
<xs:element name="NetworkProfileName"
type="string"
minOccurs="0"
/>
<xs:element name="RunOnlyIfNetworkAvailable"
type="boolean"
default="false"
minOccurs="0"
/>
<xs:element name="WakeToRun"
type="boolean"
default="false"
minOccurs="0"
/>
<xs:element name="Enabled"
type="boolean"
default="true"
minOccurs="0"
/>
<xs:element name="Hidden"
type="boolean"
default="false"
minOccurs="0"
/>
<xs:element name="DeleteExpiredTaskAfter"
type="duration"
default="PT0S"
minOccurs="0"
/>
<xs:element name="IdleSettings"
type="idleSettingsType"
minOccurs="0"
/>
<xs:element name="NetworkSettings"
type="networkSettingsType"
minOccurs="0"
/>
<xs:element name="ExecutionTimeLimit"
type="duration"
minOccurs="0"
/>
<xs:element name="Priority"
type="priorityType"
default="7"
minOccurs="0"
/>
<xs:element name="RunOnlyIfIdle"
type="boolean"
default="false"
minOccurs="0"
/>
<xs:element name="UseUnifiedSchedulingEngine"
type="boolean"
default="false"
minOccurs="0"
/>
<xs:element name="DisallowStartOnRemoteAppSession"
type="boolean"
default="false"
minOccurs="0"
/>
</xs:all>
</xs:complexType>
Child elements
Element
Type
Description
AllowHardTerminate
boolean
Specifies if the Task Scheduler service allows hard termination of the task.
AllowStartOnDemand
boolean
Specifies that the task can be started by using either the Run command or the Context menu.
DeleteExpiredTaskAfter
duration
Specifies the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is specified for this element, then the Task Scheduler service will not delete the task.
DisallowStartIfOnBatteries
boolean
Specifies that the task will not be started if the computer is running on battery power.
DisallowStartOnRemoteAppSession
boolean
Specifies that the task should not start if the task is triggered to run in a Remote Applications Integrated Locally (RAIL) session.
Enabled
boolean
Specifies that the task is enabled. The task can be performed only when this setting is True .
ExecutionTimeLimit
duration
Specifies the amount of time allowed to complete the task.
Hidden
boolean
Specifies, by default, that the task will not be visible in the user interface (UI).
IdleSettings
idleSettingsType
Specifies how the Task Scheduler performs tasks when the computer is in an idle state.
MultipleInstancesPolicy
multipleInstancesPolicyType
Specifies the policy that defines how the Task Scheduler deals with multiple instances of the task.
NetworkProfileName
string
Specifies the name of a network profile. The Task Scheduler service verifies the availability of this network when the RunOnlyIfNetworkAvailable element is set to True . The name is used for display purposes.
NetworkSettings
networkSettingsType
Specifies the settings that the Task Scheduler service uses to obtain a network profile. The Task Scheduler service checks the availability of this network when the RunOnlyIfNetworkAvailable element is set to True .
Priority
priorityType
Specifies the priority level for the task.
RestartOnFailure
restartType
Specifies that the Task Scheduler will attempt to restart the task if it fails for any reason.
RunOnlyIfIdle
boolean
Specifies that the task is run only when the computer is in an idle state.
RunOnlyIfNetworkAvailable
boolean
Specifies that the Task Scheduler will run the task only when a network is available.
StartWhenAvailable
boolean
Specifies that the Task Scheduler can start the task at any time after its scheduled time has passed.
StopIfGoingOnBatteries
boolean
Specifies that the task will be stopped if the computer switches to battery power.
UseUnifiedSchedulingEngine
boolean
Specifies that the task is run by using the Unified Scheduling Engine.
WakeToRun
boolean
Specifies that Task Scheduler will wake the computer before it runs the task.
Requirements
Requirement
Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
See also
Task Scheduler Schema Complex Types
Task Scheduler