Action object

Scripting object that provides the common properties that are inherited by all action objects. An action object is created by the ActionCollection.Create method.

Members

The Action object has these types of members:

Properties

The Action object has these properties.

Property Access type Description
Id
Read/write
Gets or sets the identifier of the action.
Type
Read-only
Gets the type of the action.

Remarks

For information on how actions and tasks work together, see Task Actions. The following table contains the scripting objects that represent the actions that can be performed:

API Description
ComHandlerAction Represents an action that fires a handler.
ExecAction Represents an action that executes a command-line operation.
EmailAction Represents an action that sends an email message.
ShowMessageAction Represents an action that shows a message box.

When reading or writing XML, the actions of a task are specified in the Actions 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

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Type library
Taskschd.tlb
DLL
Taskschd.dll

See also

Task Scheduler Scripting Objects

Task Scheduler