Trigger Task

 

Declaration

<AMTRIGGERTASK MANAGEDTASK="text (managed task name)" PASSWORD="text (encrypted)" />

See Also

Call Function | Stop Task | Write to Log | Enable/Disable Task | Shut Down AutoMate | Start Task | Backup AutoMate

Description

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

Practical Usage

Used to cause another task to trigger. When a task is triggered, all of the parameters in the Managed Task Properties (i.e. Security, Priority Logon properties, etc.) are applied.  

IMPORTANT: This is not the primary means for starting a synchronous sub-task (a much more common scenario). To simply start a sub-task use the Start Task action instead. The Start Task action contains much greater capability in terms of error handling and passing variables to the sub-tasks. This action should only be used when the started task should run asynchronously (i.e. execution of the parent will not wait for the sub-task to complete) and the other managed task properties such as Error Handling and Logging should be applied.

Parameters

General Properties

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. More on managed and unmanaged tasks

Run Password (Optional)

Text

No

(Empty)

PASSWORD="mypassword"

If the task has been 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.

Description Properties

The Description tab allows you to customize the text description of any step when it appears in the Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab is part of AutoMate's Error Handling functionality which allows you to select / omit specific errors that will cause a particular step to fail.

More about error causes properties

On Error Properties

The On Error tab is part of AutoMate's Error Handling functionality which allows you to determine what the task should do if a particular step encounters an error.

More about on error properties

Notes

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Description: Trigger task "Restart Machine".  A password has been provided.  

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

↑ Top of Page