ITaskDefinition interface

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

Methods

The ITaskDefinition interface has these methods.

Method Description
ITaskDefinition::get_Actions Gets or sets a collection of actions performed by the task.
ITaskDefinition::get_Data Gets or sets the data that is associated with the task.
ITaskDefinition::get_Principal Gets or sets the principal for the task that provides the security credentials for the task.
ITaskDefinition::get_RegistrationInfo Gets or sets the registration information used to describe a task, such as the description of the task, the author of the task, and the date the task is registered.
ITaskDefinition::get_Settings Gets or sets the settings that define how the Task Scheduler service performs the task.
ITaskDefinition::get_Triggers Gets or sets a collection of triggers used to start a task.
ITaskDefinition::get_XmlText Gets or sets the XML-formatted definition of the task.
ITaskDefinition::put_Actions Gets or sets a collection of actions performed by the task.
ITaskDefinition::put_Data Gets or sets the data that is associated with the task.
ITaskDefinition::put_Principal Gets or sets the principal for the task that provides the security credentials for the task.
ITaskDefinition::put_RegistrationInfo Gets or sets the registration information used to describe a task, such as the description of the task, the author of the task, and the date the task is registered.
ITaskDefinition::put_Settings Gets or sets the settings that define how the Task Scheduler service performs the task.
ITaskDefinition::put_Triggers Gets or sets a collection of triggers used to start a task.
ITaskDefinition::put_XmlText 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]
Target Platform Windows
Header taskschd.h

See Also

Definition Property of IRegisteredTask

IActionCollection

IPrincipal

IRegisteredTask

IRegistrationInfo

ITaskFolder

ITaskService::NewTask

ITaskSettings

ITriggerCollection