ITriggerCollection interface

Provides the methods that are used to add to, remove from, and get the triggers of a task.

Members

The ITriggerCollection interface inherits from the IDispatch interface. ITriggerCollection also has these types of members:

Methods

The ITriggerCollection interface has these methods.

MethodDescription
Clear

Clears all triggers from the collection.

Create

Creates a new trigger for the task.

Remove

Removes the specified trigger from the collection of triggers used by the task.

 

Properties

The ITriggerCollection interface has these properties.

PropertyAccess typeDescription

_NewEnum

Read-only

Gets the collection enumerator for this collection.

Count

Read-only

Gets the number of triggers in the collection.

Item

Read-only

Gets the specified trigger from the collection.

 

Remarks

When reading or writing XML for a task, the triggers for the task are specified in the Triggers element of the Task Scheduler schema.

Examples

For more information and example code for this interface, see Time Trigger Example (C++), Event Trigger Example (C++), Daily Trigger Example (C++), Registration Trigger Example (C++), Weekly Trigger Example (C++), Logon Trigger Example (C++), or Boot Trigger Example (C++).

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

Task Scheduler Interfaces
ITrigger

 

 

Show: