ITrigger::Type property

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 ITriggerCollection::Create.

This property is read-only.

Syntax


HRESULT get_Type(
  [out]  TASK_TRIGGER_TYPE2 *pType
);

Property value

One of the following TASK_TRIGGER_TYPE2 enumeration values.

ValueMeaning
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.

 

Error codes

NameMeaning
S_OK

The property value was successfully retrieved.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Taskschd.h

Library

Taskschd.lib

DLL

Taskschd.dll

See also

ITrigger
ITriggerCollection::Create
TASK_TRIGGER_TYPE2
Task Scheduler

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.