TASK_TRIGGER_TYPE enumeration (mstask.h)

[[This API may be altered or unavailable in subsequent versions of the operating system or product. Please use the Task Scheduler 2.0 Enumerated Types instead.] ]

Defines the types of triggers associated with a task.

Syntax

typedef enum _TASK_TRIGGER_TYPE {
  TASK_TIME_TRIGGER_ONCE = 0,
  TASK_TIME_TRIGGER_DAILY = 1,
  TASK_TIME_TRIGGER_WEEKLY = 2,
  TASK_TIME_TRIGGER_MONTHLYDATE = 3,
  TASK_TIME_TRIGGER_MONTHLYDOW = 4,
  TASK_EVENT_TRIGGER_ON_IDLE = 5,
  TASK_EVENT_TRIGGER_AT_SYSTEMSTART = 6,
  TASK_EVENT_TRIGGER_AT_LOGON = 7
} TASK_TRIGGER_TYPE, *PTASK_TRIGGER_TYPE;

Constants

 
TASK_TIME_TRIGGER_ONCE
Value: 0
Trigger is set to run the task a single time.




When this value is specified, the Type member of the
TASK_TRIGGER structure is ignored.
TASK_TIME_TRIGGER_DAILY
Value: 1
Trigger is set to run the task on a daily interval.




When this value is specified, the
DAILY member of the
TRIGGER_TYPE_UNION structure is used.
TASK_TIME_TRIGGER_WEEKLY
Value: 2
Trigger is set to run the work item on specific days of a specific week of a specific month.




When this value is specified, the
WEEKLY member of the
TRIGGER_TYPE_UNION structure is used.
TASK_TIME_TRIGGER_MONTHLYDATE
Value: 3
Trigger is set to run the task on a specific day(s) of the month.




When this value is specified, the
MONTHLYDATE member of the
TRIGGER_TYPE_UNION structure is used.
TASK_TIME_TRIGGER_MONTHLYDOW
Value: 4
Trigger is set to run the task on specific days, weeks, and months.




When this value is specified, the
MONTHLYDOW member of the
TRIGGER_TYPE_UNION structure is used.
TASK_EVENT_TRIGGER_ON_IDLE
Value: 5
Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task.




When this value is specified, the wStartHour, wStartMinute, and Type member of the
TASK_TRIGGER structure are ignored.
TASK_EVENT_TRIGGER_AT_SYSTEMSTART
Value: 6
Trigger is set to run the task at system startup.




When this value is specified, the Type member of the
TASK_TRIGGER structure is ignored.
TASK_EVENT_TRIGGER_AT_LOGON
Value: 7
Trigger is set to run the task when a user logs on.




When this value is specified, the Type member of the
TASK_TRIGGER structure is ignored.

Remarks

The constants defined here are used in the TriggerType member of the TASK_TRIGGER structure.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header mstask.h

See also

IScheduledWorkItem::SetIdleWait

TASK_TRIGGER

TASK_TRIGGER_TYPE2

TRIGGER_TYPE_UNION

Task Scheduler