TaskDefinition Object
TaskDefinition Object

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.

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 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 clientWindows Vista
Minimum supported serverWindows Server 2008
Type LibraryTaskschd.tlb
DLLTaskschd.dll

Send comments about this topic to Microsoft

Build date: 11/12/2009

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View