...
OS | Task Configuration | Scenario/Description | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Linux | Scenario: BasedExecution of an Task instance success or failure depends on the exit code of the command , the task instance is executed with success or failurebeing executed. If the command is executed with exit code = 0, the default behavior is that the Task Instance FAILED status istask instance completes with Success status. Otherwise, the task instance status is Failed with exit code = 1. This example shows the execution of thean
| |||||||||||||||||||||||
Linux | Scenario: Command execution that produces a valid JSON result:. This example shows a command that produces JSON output on STDOUT. In such a case, the output is also visible in the task instance EXTENSION output.
| |||||||||||||||||||||||
Linux | Scenario: Execution of a shell script stored in the Controller. The example shows execution of script.sh. Environment variable ${UE_CMD_ADDFILE} points to the script full path referenced from Optional Additional File field. Note: In this example, the reference to the environmental variable UE_CMD_ADDFILE is surrounded by quotes. This was done because the path to this variable contains spaces, so it must be quoted in order for the shell to resolve it correctly. | |||||||||||||||||||||||
Linux | Scenario: Conditional execution of commands. This example shows a scenario that depends on the result of grep. If there is a pattern match, a success message is displayed; otherwise, an error message is printed to indicate the pattern wasn't found. | |||||||||||||||||||||||
Linux | Scenario: Command Stacking. This example shows multiple commands being executed:
| |||||||||||||||||||||||
Linux | Scenario: Redirection of output. In this example, the contents of the current directory are listed in long format using ls -l, and then redirected to the output.log file. Afterwards, the contents are displayed through the cat command. | |||||||||||||||||||||||
Windows | Scenario: PowerShell script execution. The example shows execution of a PowerShell script provided by the Optional Additional File field referenced through the UE_CMD_ADDFILE environment variable.
| |||||||||||||||||||||||
Windows | Scenario: Execution of a batch file. The example shows execution of a batch file provided by the Optional Additional File field referenced through the UE_CMD_ADDFILE environment variable.
|
...
Field | Type | Description | Version Information |
---|---|---|---|
Action | Choice | The action performed upon the task execution. Available options:
| Introduced in 1.0.0 |
Optional Additional File | Script | A An optional field to include a file used either as a parameter in the command or as a script to be executed with an interpreter. This file can be referenced in the command line using the UE_CMD_ADDFILE environment variable. This field is particularly useful when the required files are not present on the agent’s filesystem, allowing the Controller to serve as the source for these files. | Introduced in 1.0.0 |
Command | Large Text | The Command Line to be executed. It should be provided as a single line. Any additional lines will be ignored. Environment variable UC_CMD_ADDFILE can be used here to reference the additional file provided. Required when Action is “Run Command” | Introduced in 1.0.0 |
Runtime Directory | Text | The Runtime Directory just before the execution of the command. While the Runtime Directory field is not mandatory, it is highly recommended to be configured. This ensures clarity about the directory from which the command is executed | Introduced in 1.0.0 |
...
Exit Code | Status | Status Description | Meaning |
---|---|---|---|
0 | Success | “Task executed successfully. “ | Exit code for successful executionIf the executed command succeeds, it returns an exit code of 0. The task will reflect this success by also returning exit code = 0. |
1 | Failure | ““Execution Failed: <<Error Description>>” | Exit code for failed executionThis indicates that the executed command failed, or the task itself failed for some other reason. |
20 | Failure | “Data Validation Error: <<Error Description>> “ | Input fields validation error. |
...
Anchor | ||||
---|---|---|---|---|
|
ue-cmd-1.0.0 (2024-10-31
...
)
Initial Release