2.5.4 Settings Schema Part

If present, the Settings Schema Part specifies how to run the actions and additional conditions. The task can run only if the following machine conditions match the following settings when the trigger occurs: running on battery, DisallowStartIfOnBatteries; network available, RunOnNetworkAvailable; and idle, RunOnlyIfIdle.

 <!-- Settings -->
 <xs:complexType name="settingsType">
   <xs:all>
     <xs:element name="AllowStartOnDemand" type="xs: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="xs:boolean" 
     default="true" minOccurs="0"/>
     <xs:element name="StopIfGoingOnBatteries" type="xs:boolean" 
     default="true" minOccurs="0"/>
     <xs:element name="AllowHardTerminate" type="xs:boolean" 
     default="true" minOccurs="0"/>
     <xs:element name="StartWhenAvailable" type="xs:boolean" 
     default="false" minOccurs="0"/>
     <xs:element name="NetworkProfileName" type="xs:string" 
     minOccurs="0"/>
     <xs:element name="RunOnlyIfNetworkAvailable" type="xs:boolean" 
     default="false" minOccurs="0"/>
     <xs:element name="WakeToRun" type="xs:boolean" default="false" 
     minOccurs="0"/>
     <xs:element name="Enabled" type="xs:boolean" default="true" 
     minOccurs="0"/>
     <xs:element name="Hidden" type="xs:boolean" default="false" 
     minOccurs="0"/>
     <xs:element name="DeleteExpiredTaskAfter" type="xs: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="xs:duration" 
     minOccurs="0"/>
     <xs:element name="Priority" type="priorityType" default="7" 
     minOccurs="0"/>
     <xs:element name="RunOnlyIfIdle" type="xs:boolean" 
     default="false" minOccurs="0"/>
   </xs:all>
 </xs:complexType>

The following two settings are supported only in the v1.3 schema.

     <xs:element name="UseUnifiedSchedulingEngine" type="xs:boolean" default="false" minOccurs="0" />
     <xs:element name="DisallowStartOnRemoteAppSession" type="xs:boolean" default="false" minOccurs="0" />
  

The following settings are supported only in the v1.4 schema.

     <xs:element name="MaintenanceSettings" type="maintenanceSettingsType" 
     minOccurs="0"/>
     <xs:element name="Volatile" type="xs:boolean" default="false" minOccurs="0"/>