TaskSettings Class

Provides the settings that the Task Scheduler service uses to perform the task.

Definition

Namespace: Microsoft.Win32.TaskScheduler
Assembly: Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.11.1
[XmlRootAttribute("Settings", Namespace = "http://schemas.microsoft.com/windows/2004/02/mit/task", 
	IsNullable = true)]
public sealed class TaskSettings : IDisposable, 
	IXmlSerializable, INotifyPropertyChanged
Inheritance
Object    TaskSettings
Implements
INotifyPropertyChanged, IDisposable, IXmlSerializable

Properties

AllowDemandStart Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu.
AllowHardTerminateGets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess.
CompatibilityGets or sets an integer value that indicates which version of Task Scheduler a task is compatible with.
DeleteExpiredTaskAfter 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.
DisallowStartIfOnBatteries Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power.
DisallowStartOnRemoteAppSession 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.
Enabled 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 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.
HiddenGets or sets a Boolean value that indicates that the task will not be visible in the UI by default.
IdleSettings Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state.
MaintenanceSettingsGets or sets the information that the Task Scheduler uses during Automatic maintenance.
MultipleInstancesGets 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 profile is specified in the NetworkSettings property, then the task will run only if the specified network profile is available.
PriorityGets or sets the priority level of the task.
RestartCountGets or sets the number of times that the Task Scheduler will attempt to restart the task.
RestartIntervalGets or sets a value that specifies how long the Task Scheduler will attempt to restart the task.
RunOnlyIfIdle 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.
RunOnlyIfLoggedOn 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)
RunOnlyIfNetworkAvailableGets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available.
StartWhenAvailable 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.
StopIfGoingOnBatteriesGets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power.
UseUnifiedSchedulingEngineGets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task.
VolatileGets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts.
WakeToRun Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task.
XmlTextGets or sets an XML-formatted definition of the task settings.

Methods

DisposeReleases all resources used by this class.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a String that represents this instance.
(Overrides ObjectToString)

Events

PropertyChangedOccurs when a property value changes.

See Also