task
task copied to clipboard
feat: Command timeouts
Summary
Add command-level timeout support to prevent commands from hanging indefinitely in task pipelines.
Closes #1569
Usage
version: '3'
tasks:
deploy:
cmds:
- cmd: npm run build
timeout: 5m
- cmd: ./deploy.sh
timeout: 30m
Commands exceeding their timeout are terminated:
task: Failed to run task "deploy": task: [deploy] command timeout exceeded (5m): context deadline exceeded
Implementation Details
- Timeout applies per command, not per task
- Works with both shell commands and task calls
- Deferred commands use separate context and run even if parent times out
- ignore_error flag does not suppress timeout errors
- Zero/unspecified timeout maintains current behavior (no timeout)