Click or drag to resize
Task Scheduler Managed Class Library

Trigger Class

Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using the AddTTrigger(TTrigger) or the AddNew(TaskTriggerType) method.
Inheritance Hierarchy
SystemObject
  Microsoft.Win32.TaskSchedulerTrigger
    More...

Namespace:  Microsoft.Win32.TaskScheduler
Assembly:  Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.10.1
Syntax
public abstract class Trigger : IDisposable, 
	ICloneable, IEquatable<Trigger>, IComparable, IComparable<Trigger>, 
	INotifyPropertyChanged
Request Example View Source

The Trigger type exposes the following members.

Properties
  NameDescription
Public propertyEnabled
Gets or sets a Boolean value that indicates whether the trigger is enabled.
Public propertyEndBoundary
Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated.
Note Note
While the maximum value for this property is MaxValue, the Windows Task Scheduler management application that is part of the OS will fail if this value is greater than December 31, 9998.
Public propertyExecutionTimeLimit
Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task Scheduler 1.0.
Public propertyId
Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0.
Public propertyRepetition
Gets a RepetitionPattern instance that indicates how often the task is run and how long the repetition pattern is repeated after the task is started.
Public propertyStartBoundary
Gets or sets the date and time when the trigger is activated.
Public propertyTriggerType
Gets the type of the trigger.
Top
Methods
  NameDescription
Protected methodCheckBindValue
Checks the bind value for any conversion.
Public methodClone
Creates a new Trigger that is an unbound copy of this instance.
Public methodCompareTo
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Public methodCopyProperties
Copies the properties from another Trigger the current instance. This will not copy any properties associated with any derived triggers except those supporting the ITriggerDelay interface.
Public methodStatic memberCreateTrigger
Creates the specified trigger.
Public methodDispose
Releases all resources used by this class.
Public methodEquals(Object)
Determines whether the specified Object, is equal to this instance.
(Overrides ObjectEquals(Object).)
Public methodEquals(Trigger)
Indicates whether the current object is equal to another object of the same type.
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 methodStatic memberFromCronFormat
Creates a trigger using a cron string.
Public methodGetHashCode
Returns a hash code for this instance.
(Overrides ObjectGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodGetUnboundValueOrDefaultT
Gets the unbound value or a default.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnNotifyPropertyChanged
Called when a property has changed to notify any attached elements.
Public methodSetRepetition Obsolete.
Sets the repetition.
Public methodToString
Returns a string representing this trigger.
(Overrides ObjectToString.)
Public methodToString(CultureInfo)
Returns a String that represents this trigger in a specific language.
Protected methodV2GetTriggerString
Gets the non-localized trigger string for V2 triggers.
Top
Events
  NameDescription
Public eventPropertyChanged
Occurs when a property value changes.
Top
Fields
  NameDescription
Protected fieldunboundValues
In testing and may change. Do not use until officially introduced into library.
Top
See Also
Inheritance Hierarchy
SystemObject
  Microsoft.Win32.TaskSchedulerTrigger
    Microsoft.Win32.TaskSchedulerBootTrigger
    Microsoft.Win32.TaskSchedulerCustomTrigger
    Microsoft.Win32.TaskSchedulerDailyTrigger
    Microsoft.Win32.TaskSchedulerEventTrigger
    Microsoft.Win32.TaskSchedulerIdleTrigger
    Microsoft.Win32.TaskSchedulerLogonTrigger
    Microsoft.Win32.TaskSchedulerMonthlyDOWTrigger
    Microsoft.Win32.TaskSchedulerMonthlyTrigger
    Microsoft.Win32.TaskSchedulerRegistrationTrigger
    Microsoft.Win32.TaskSchedulerSessionStateChangeTrigger
    Microsoft.Win32.TaskSchedulerTimeTrigger
    Microsoft.Win32.TaskSchedulerWeeklyTrigger