Export (0) Print
Expand All

Trigger Types

The time-based and event-based triggers that are described below allow you to start tasks in a variety of ways.

Task Scheduler 2.0 Triggers

The following trigger types are defined by the TASK_TRIGGER_TYPE2 enumeration.

TriggerDescription
Event trigger (event based trigger)

For scripting development, see EventTrigger.

For C++ development, see IEventTrigger.

For XML development, see EventTrigger Element.

Starts the task when a specific system event occurs.
Time trigger (time-based trigger)

For scripting development, see TimeTrigger.

For C++ development, see ITimeTrigger.

For XML development, see TimeTrigger Element.

Starts the task at a specific date and time.
Daily trigger (time-based calendar trigger)

For scripting development, see DailyTrigger.

For C++ development, see IDailyTrigger.

For XML development, see CalendarTrigger Element.

Starts the task at a specific time on a daily schedule. For example, the task starts at 8:00 AM every day or every other day.
Weekly trigger (time-based calendar trigger)

For scripting development, see WeeklyTrigger.

For C++ development, see IWeeklyTrigger.

For XML development, see CalendarTrigger Element.

Starts the task at a specific time on a weekly schedule. For example, the task starts at 8:00 AM on a specific day of the week every week or on a specific day of the week every other week.
Monthly trigger (time-based calendar trigger)

For scripting development, see MonthlyTrigger.

For C++ development, see IMonthlyTrigger.

For XML development, see CalendarTrigger Element.

Starts the task at a specific time on a monthly schedule. For example, the task starts at 8:00 AM on specific days of the month on specific months.
Monthly day-of-week (DOW) trigger (time-based calendar trigger)

For scripting development, see MonthlyDOWTrigger.

For C++ development, see IMonthlyDOWTrigger.

For XML development, see CalendarTrigger Element.

Starts the task at a specific time on a monthly day-of-week schedule. For example, the task starts at 8:00 AM on specific days of the week, weeks of the month, and months of the year.
Idle trigger (event-based trigger)

For scripting development, see IdleTrigger.

For C++ development, see IIdleTrigger.

For XML development, see IdleTrigger Element.

Starts the task when the computer enters an idle state.
Registration trigger (event-based trigger)

For scripting development, see RegistrationTrigger.

For C++ development, see IRegistrationTrigger.

For XML development, see RegistrationTrigger Element.

Starts the task when the task is registered or updated.
Boot trigger (event-based trigger)

For scripting development, see BootTrigger.

For C++ development, see IBootTrigger.

For XML development, see BootTrigger Element.

Starts the task when the system is booted.
Logon trigger (event-based trigger)

For scripting development, see LogonTrigger.

For C++ development, see ILogonTrigger.

For XML development, see LogonTrigger Element.

Starts the task when a user logs on.
Session state change trigger (event-based trigger)

For scripting development, see SessionStateChangeTrigger.

For C++ development, see ISessionStateChangeTrigger.

For XML development, see SessionStateChangeTrigger Element.

Starts the task when a Terminal Server session changes state.

 

Task Scheduler 1.0 Triggers

The following trigger types are defined by the TASK_TRIGGER_TYPE enumeration. To implement any of the following triggers, see the TASK_TRIGGER structure.

  • Once trigger: Starts the task a single time.
  • Daily trigger: Starts the task on a daily interval.
  • Weekly trigger: Starts the task on a weekly schedule.
  • Monthly trigger: Starts the task on a monthly schedule.
  • Monthly DOW trigger: Starts the task on a monthly day-of-week schedule.
  • On Idle trigger: Starts the task when the computer is in an idle state.
  • System Start trigger: Starts the task when the computer is booted.
  • Logon trigger: Starts the task when a specific user logs on.

Related topics

Task Triggers
Trigger Interfaces
Trigger Structures

 

 

Community Additions

ADD
Show:
© 2014 Microsoft