Task - Enable/Disable
Declaration
<AMTASK ACTIVITY="enable_disable" MANAGEDTASK="text" ENABLE="YES/NO" PASSWORD="text (encrypted)" />
Description
Enables a currently disabled managed task or disables a currently enabled managed task. If the specified task is already set to the proper value, this parameter is ignored and the task continues execution with no errors.
Practical usage
Often used to disable execution of other tasks in order for them not to interfere with the currently running task. Normally, a Disable task step could be placed at the beginning the task and an Enable task step could be placed at the end.
Parameters
General
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Enable/Disable | Yes/No | Yes | Enable | ENABLE="NO" | Enables (YES) or disables (NO) a managed task. This parameter is set to Enable by default. |
Managed Task | Text | Yes | (Empty) |
|
Specifies
the name of the managed task. Click the drop-down combo box to select
the desired task from the list that appears or manually
enter the task name. NOTE: The task must exist in the current machine's task list at runtime
or the step will fail. Also, keep in mind that changing the task
name or parent folder name later can break this linkage once created. |
Password (optional) | Text | No | (Empty) | PASSWORD="text (encrypted)" | If the task you wish to enable/disable was previously password protected from allowing its properties to be modified (as specified in the managed task's Security properties), this parameter indicates the password to permit modifications to the task. |
Examples
- Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
- To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.
Example 1
This sample task enables a password protected managed task.
<AMTASK ACTIVITY="enable_disable" MANAGEDTASKID="{F1B63818-B577-46B5-9EED-E3A3E5F5D1A0}" MANAGEDTASK="Samples\About - Sample Tasks" PASSWORD="AM5BQbQdJgNxAcdkESIlXV+pQ==aME" />
Example 2
This sample task disables a password protected managed task.
<AMTASK ACTIVITY="enable_disable" MANAGEDTASKID="{F1B63818-B577-46B5-9EED-E3A3E5F5D1A0}" MANAGEDTASK="Samples\About - Sample Tasks" ENABLE="NO" PASSWORD="AM5vADJYKYpw8rvBGyASI8m9A==aME" />