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.

Definition

Properties

EnabledGets or sets a Boolean value that indicates whether the trigger is enabled.
EndBoundary Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated.

  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.
ExecutionTimeLimit 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.
IdGets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0.
Repetition 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.
StartBoundaryGets or sets the date and time when the trigger is activated.
TriggerTypeGets the type of the trigger.

Methods

CheckBindValueChecks the bind value for any conversion.
CloneCreates a new Trigger that is an unbound copy of this instance.
CompareTo 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.
CopyProperties 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.
CreateTriggerCreates the specified trigger.
DisposeReleases all resources used by this class.
Equals(Object)Determines whether the specified Object, is equal to this instance.
(Overrides ObjectEquals(Object))
Equals(Trigger)Indicates whether the current object is equal to another object of the same type.
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
FromCronFormatCreates a trigger using a cron string.
GetHashCodeReturns a hash code for this instance.
(Overrides ObjectGetHashCode)
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetUnboundValueOrDefaultTGets the unbound value or a default.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
OnNotifyPropertyChangedCalled when a property has changed to notify any attached elements.
SetRepetitionSets the repetition.
Obsolete.
ToStringReturns a string representing this trigger.
(Overrides ObjectToString)
ToString(CultureInfo)Returns a String that represents this trigger in a specific language.
V2GetTriggerStringGets the non-localized trigger string for V2 triggers.

Events

PropertyChangedOccurs when a property value changes.

Fields

unboundValuesIn testing and may change. Do not use until officially introduced into library.

See Also