Command
Configuration
- type: command
command: ["executable", "arg1", "arg2"] # Required: Command and arguments as array or string
working_dir: /path/to/dir # Optional: Directory to run the command in (default: Sling's current directory)
print: true # Optional: Print command output to console (default: true)
capture: true # Optional: Capture command output in hook result (default: true)
timeout: 300 # Optional: Command timeout in seconds (default: no timeout)
env: # Optional: Environment variables for the command
ENV_VAR1: "value1"
ENV_VAR2: "value2"
ssh_conn: MY_SSH # Optional: Run the command remotely over an SSH connection
on_failure: abort # Optional: abort/warn/quiet/skip
id: my_id # Optional. Will be generated. Use `log` hook with {runtime_state} to view state.Properties
Property
Required
Description
Working Directory
Output
Examples
Run Data Processing Script
Run a CLI Tool from Its Own Directory
System Cleanup
Run Data Quality Checks
Conditional Command Execution
Run Shell Script
Generate Reports
Last updated
Was this helpful?