Click or drag to resize
Task Scheduler Managed Class Library

TaskSettings Class

Provides the settings that the Task Scheduler service uses to perform the task.
Inheritance Hierarchy
SystemObject
  Microsoft.Win32.TaskSchedulerTaskSettings

Namespace:  Microsoft.Win32.TaskScheduler
Assembly:  Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.10.1
Syntax
public sealed class TaskSettings : IDisposable, 
	IXmlSerializable, INotifyPropertyChanged
Request Example View Source

The TaskSettings type exposes the following members.

Properties
  NameDescription
Public propertyAllowDemandStart
Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu.
Public propertyAllowHardTerminate
Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess.
Public propertyCompatibility
Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with.
Public propertyDeleteExpiredTaskAfter
Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is specified for this property, then the Task Scheduler service will not delete the task.
Public propertyDisallowStartIfOnBatteries
Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power.
Public propertyDisallowStartOnRemoteAppSession
Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote Applications Integrated Locally (RAIL) session.
Public propertyEnabled
Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE.
Public propertyExecutionTimeLimit
Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it starts to run.
Public propertyHidden
Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default.
Public propertyIdleSettings
Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state.
Public propertyMaintenanceSettings
Gets or sets the information that the Task Scheduler uses during Automatic maintenance.
Public propertyMultipleInstances
Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task.
Public propertyNetworkSettings
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 profile is specified in the NetworkSettings property, then the task will run only if the specified network profile is available.
Public propertyPriority
Gets or sets the priority level of the task.
Public propertyRestartCount
Gets or sets the number of times that the Task Scheduler will attempt to restart the task.
Public propertyRestartInterval
Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task.
Public propertyRunOnlyIfIdle
Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition.
Public propertyRunOnlyIfLoggedOn
Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only)
Public propertyRunOnlyIfNetworkAvailable
Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available.
Public propertyStartWhenAvailable
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.
Public propertyStopIfGoingOnBatteries
Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power.
Public propertyUseUnifiedSchedulingEngine
Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task.
Public propertyVolatile
Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts.
Public propertyWakeToRun
Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task.
Public propertyXmlText
Gets or sets an XML-formatted definition of the task settings.
Top
Methods
  NameDescription
Public methodDispose
Releases all resources used by this class.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a String that represents this instance.
(Overrides ObjectToString.)
Top
Events
  NameDescription
Public eventPropertyChanged
Occurs when a property value changes.
Top
See Also