TimeTrigger (triggerGroup) Element

Specifies a trigger that starts a task when the trigger is activated.

<xs:element name="TimeTrigger"
    type="timeTriggerType"
 />

The TimeTrigger element is defined by the triggerGroup .

Parent element

Element Derived from Description
Triggers triggersType Specifies the triggers that start the task.

Child elements

Element Type Description
Enabled (triggerBaseType) boolean Specifies that the trigger is enabled.
EndBoundary (triggerBaseType) dateTime Specifies the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated.
ExecutionTimeLimit (triggerBaseType) duration Specifies the maximum amount of time in which the task can be started by the trigger.
Repetition (triggerBaseType) repetitionType Specifies how often the task is run and how long the repetition pattern is repeated after the task is started.
StartBoundary (triggerBaseType) dateTime Specifies the date and time when the trigger is activated. This element is required.

Attributes

Name Type Description
Id string The identifier of the trigger.

Remarks

The StartBoundary element is a required element for time and calendar triggers (TimeTrigger and CalendarTrigger).

For scripting development, a time trigger is specified using the TimeTrigger object.

For C++ development, a time trigger is specified using the ITimeTrigger interface.

The child elements listed above are defined by the triggerBaseType complex element types. These elements must be added in the sequence shown below.

Examples

For a complete example of the XML for a task that specifies a time trigger, see Time Trigger Example (XML).

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]

See also

Task Scheduler