Skip to content

Latest commit

 

History

History
96 lines (57 loc) · 4.98 KB

timetrigger.md

File metadata and controls

96 lines (57 loc) · 4.98 KB
title description ms.assetid keywords topic_type api_name api_location api_type ms.topic ms.date
TimeTrigger object (Windows.applicationmodel.background.h)
Scripting object that represents a trigger that starts a task at a specific date and time.
3c277827-8e70-42e7-a849-773ecc997a93
time trigger Task Scheduler , object
TimeTrigger object Task Scheduler
TimeTrigger object Task Scheduler , described
apiref
TimeTrigger
taskschd.dll
COM
reference
05/31/2018

TimeTrigger object

Scripting object that represents a trigger that starts a task at a specific date and time.

Members

The TimeTrigger object has these types of members:

Properties

The TimeTrigger object has these properties.

Property Access type Description
Enabled
Read/write
Inherited from Trigger. Gets or sets a Boolean value that indicates whether the trigger is enabled.
EndBoundary
Read/write
Inherited from Trigger. Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated.
ExecutionTimeLimit
Read/write
Inherited from Trigger. Gets or sets the maximum amount of time that the task launched by the trigger is allowed to run.
Id
Read/write
Inherited from Trigger. Gets or sets the identifier for the trigger.
RandomDelay
Read/write
Gets or sets a delay time that is randomly added to the start time of the trigger.
Repetition
Read/write
Inherited from Trigger. Gets or sets how often the task is run and how long the repetition pattern is repeated after the task is started.
StartBoundary
Read/write
Inherited from Trigger. Gets or sets the date and time when the trigger is activated. This element is required.
Type
Read-only
Inherited from Trigger. Gets the type of the trigger.

Remarks

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

When reading or writing XML for a task, an idle trigger is specified using the TimeTrigger element of the Task Scheduler schema.

Examples

For more information and example code for this scripting object, see Time Trigger Example (Scripting).

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
Windows.applicationmodel.background.h
Type library
Taskschd.tlb
DLL
Taskschd.dll

See also

Trigger

TriggerCollection

TriggerCollection.Create