shell_exec_async
Start commands in the background and return a job ID instantly for long builds, dev servers, watchers, and log tails. Manage each job later with shell_job.
Instructions
Start a command in the background and return a job_id immediately. For long builds, dev servers, watchers and tailing logs. Read or stop it later with shell_job.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory. Relative paths resolve against the server cwd. Default: server cwd. | |
| env | No | Extra environment variables. | |
| name | No | Label for the job, to recognise it in shell_job list. | |
| login | No | Run through a login shell. | |
| shell | No | Override shell for this call: auto|bash|gitbash|zsh|fish|sh|cmd|powershell|pwsh|wsl, a configured name, or an absolute path. | |
| command | Yes | Command line to run in the shell. Multi-line scripts are supported. | |
| timeout_ms | No | Kill the command (whole process tree) after this many ms. 0 = no limit. | |
| interactive | No | Keep stdin open so you can send input with shell_job action="write". |