Execute command

Description

This job runs a bash command via an SSH connection on the remote server

The command will be run in a background process on the server and the process ID stored in Orchestra. You can find the process ID under the run parameters of the Orchestra Task. When the process completes, the exit code, stdout and stderr from the command will be saved to files in the /tmp directory. Orchestra will poll the process ID on your server waiting for completion, and fetch the results from the /tmp directory to succeed or fail the Orchestra task.

The external message on the task will show up to the last 3 lines of the stdout or stderr log depending on if the command succeeded or failed.

Use Cases

This is a great option if you want to trigger a process that already exists on a Linux server you manage. For example,

  • Executing a bash script on a server

  • Running a Python program from within a virtual environment on the server

  • Running a Dbt command on a server that has your Dbt files

Currently we do not support cancelling a Linux SSH execute command Task. Please get in touch if you require this feature.

Parameters

These parameters are required to run the Execute Task.

Error handling

Orchestra will fail the Task if the command returns any exit code other than 0. Stdout and stderr logs will be sent to Orchestra and displayed as separate log files on the Orchestra platform.

Last updated