ITaskDefinition interface

Defines all the components of a task, such as the task settings, triggers, actions, and registration information.

Members

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

Properties

The ITaskDefinition interface has these properties.

PropertyAccess typeDescription

Actions

Read/write

Gets or sets a collection of actions that are performed by the task.

Data

Read/write

Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by third-parties who wish to extend the task format.

Principal

Read/write

Gets or sets the principal for the task that provides the security credentials for the task.

RegistrationInfo

Read/write

Gets or sets the registration information that is used to describe a task, such as the description of the task, the author of the task, and the date the task is registered.

Settings

Read/write

Gets or sets the settings that define how the Task Scheduler service performs the task.

Triggers

Read/write

Gets or sets a collection of triggers that are used to start a task.

XmlText

Read/write

Gets or sets the XML-formatted definition of the task.

 

Remarks

When reading or writing your own XML for a task, a task definition is specified using the Task 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

IActionCollection
IPrincipal
IRegistrationInfo
ITaskSettings
ITriggerCollection
IRegisteredTask
ITaskFolder
Definition Property of IRegisteredTask
ITaskService::NewTask

 

 

Show: