Run Command activity

The Run Command activity runs a command (including shell scripts) on a Linux or UNIX computer.

Input variables

Attention: The Run Command activity is deprecated in this release. If you have a workflow created in a previous version that uses this activity, your workflow will continue to work normally after upgrading to Helsinki. However, to use this functionality in a new workflow, you must create a custom activity using the SSH provider template in the ServiceNow® activity designer.
Table 1. Run command input variables
Field Description
Long running Select this check box to disable the SSH connection timeout if you think the command will take longer to run than the default 60 seconds. Orchestration periodically checks the running process to determine its status until it is finished.
Hostname Hostname or IP address of destination server for SSH activity.
Directory Name of the working directory.
Command The command to run from this activity.
Sudo Select this check box to use sudo to run the command on the host machine.
Sensor script The script to run using the results of the probe. The output from the probe is contained in a variable called output. Any error from the probe is contained in a variable called error.