Scripting object that defines all the components of a task, such as the task settings, triggers, actions, and registration information.
Methods
The TaskDefinition object does not define any methods.
Properties
The TaskDefinition object defines the following properties.
| Property | Access type | Description |
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 scripting object, see Time Trigger Example (Scripting) , Event Trigger Example (Scripting), Daily Trigger Example (Scripting), Registration Trigger Example (Scripting), Weekly Trigger Example (Scripting), Logon Trigger Example (Scripting), or Boot Trigger Example (Scripting).
Requirements
| Minimum supported client | Windows Vista |
| Minimum supported server | Windows Server 2008 |
| Type Library | Taskschd.tlb |
| DLL | Taskschd.dll |
Send comments about this topic to Microsoft
Build date: 11/12/2009