Skip to content

Script Execution

Script execution is EasyShell’s core capability. You can run scripts on individual hosts, clusters, or custom host selections with real-time output streaming.

Navigate to Script LibraryCreate Script to write a new script:

  1. Name — A descriptive name for the script
  2. Type — Shell type (Bash, Python, etc.)
  3. Content — The script body, edited in the built-in Monaco code editor
  4. Parameters — Define input variables that are resolved at execution time
  5. Category — Classify the script (monitoring, deployment, maintenance, etc.)

Scripts support parameterized variables using the {{variable_name}} syntax:

#!/bin/bash
set -euo pipefail
echo "Deploying version {{version}} to {{environment}}"
cd /opt/{{app_name}}
git checkout {{version}}
systemctl restart {{app_name}}

When executing, users are prompted to fill in each parameter value.

  1. Navigate to a host’s detail page
  2. Click Execute Script
  3. Select a script from the library or enter ad-hoc commands
  4. Fill in any parameters
  5. Click Execute
  1. Go to Script Library → select a script
  2. Click Batch Execute
  3. Choose target hosts (by selection, cluster, or tag filter)
  4. Configure execution settings:
    • Concurrency — Maximum parallel executions (default: 10)
    • Timeout — Per-host execution timeout (default: 300s)
    • Stop on Error — Whether to halt remaining hosts on failure
  5. Click Execute

During execution, EasyShell streams script output in real-time via WebSocket:

  • Live Output — See stdout and stderr as they happen
  • Per-Host View — Switch between individual host outputs in batch mode
  • Search — Full-text search across log output
  • Download — Export complete logs after execution

All executions are recorded with:

FieldDescription
ScriptName and version of the executed script
TargetHost(s) or cluster
StatusSuccess, Failed, Timeout, Cancelled
DurationWall-clock execution time
Exit CodeProcess exit code per host
ExecutorUser who initiated the execution
TimestampStart and end times

Access execution history from the Tasks page or from individual host detail pages.

Scripts can be scheduled for recurring execution:

  1. Select a script → Schedule
  2. Configure the cron expression (e.g., 0 2 * * * for daily at 2 AM)
  3. Select target hosts
  4. Enable/disable notifications on failure