Task - Run

Declaration

<AMTASK ACTIVITY="trigger" MANAGEDTASK="text" PASSWORD="text (encrypted)" />

Description: Starts a managed task as if it were triggered. All managed task properties will be utilized, such as Logon, Priority and Security settings.

Practical Usage

Causes another task to execute as if it was started by a trigger. When a task is triggered, all of the parameters in the properties of the triggered task are applied.  

This activity should only be used if the started task is allowed to run asynchronously (e.g., execution of the parent will not wait for the subtask to complete) and other managed task properties such as Error Handling and Logging should be applied. This is not the primary means for starting a synchronous subtask (a much more common scenario). To start a subtask, use the Start subtask activity instead. This activity contains much greater capability in terms of error handling and passing variables to subtasks.

General Parameters

Property

Type

Required

Default

Markup

Description

Managed task to trigger

Text

Yes

(Empty)

  1. MANAGEDTASK="Task2"

  2. MANAGEDTASK="Foldername\Task2" 

Specifies the name of the managed task to trigger. The task must exist in the current machine's task list at runtime or the step will fail.

Run Password (optional)

Text

No

(Empty)

PASSWORD="mypassword"

If the task is password protected (as specified in the managed task's Security properties) this parameter indicates the password that should be used to allow it to run.

Example

The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.

DescriptionTrigger task "Restart Machine". A password has been provided.  

<AMTRIGGERTASK MANAGEDTASK="Restart Machine" PASSWORD="AM1NYGaQ+SuSz3DG0Qcp398Rg==aME" />