Trigger.Type property

For scripting, gets the type of the trigger. The trigger type is defined when the trigger is created and cannot be changed later. For information on creating a trigger, see TriggerCollection.Create.

Syntax

Trigger.Type As TASK_TRIGGER_TYPE2

Property value

One of the following TASK_TRIGGER_TYPE2 enumeration values.

Value Meaning
TASK_TRIGGER_EVENT
0
Starts the task when a specific event occurs.
TASK_TRIGGER_TIME
1
Starts the task at a specific time of day.
TASK_TRIGGER_DAILY
2
Starts the task daily.
TASK_TRIGGER_WEEKLY
3
Starts the task weekly.
TASK_TRIGGER_MONTHLY
4
Starts the task monthly.
TASK_TRIGGER_MONTHLYDOW
5
Starts the task every month on a specific day of the week.
TASK_TRIGGER_IDLE
6
Starts the task when the computer goes into an idle state.
TASK_TRIGGER_REGISTRATION
7
Starts the task when the task is registered.
TASK_TRIGGER_BOOT
8
Starts the task when the computer boots.
TASK_TRIGGER_LOGON
9
Starts the task when a specific user logs on.
TASK_TRIGGER_SESSION_STATE_CHANGE
11
Triggers the task when a specific session state changes.

Requirements

Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Type library
Taskschd.tlb
DLL
Taskschd.dll

See also

TriggerCollection.Create

TASK_TRIGGER_TYPE2

Task Scheduler