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 |
|
|
|
|
|
reference |
05/31/2018 |
Scripting object that represents a trigger that starts a task at a specific date and time.
The TimeTrigger object has these types of members:
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. |
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.
For more information and example code for this scripting object, see Time Trigger Example (Scripting).
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista [desktop apps only] |
Minimum supported server |
Windows Server 2008 [desktop apps only] |
Header |
|
Type library |
|
DLL |
|