DOC_INDEX
THEME
wait
Pause workflow execution for rate limiting, progressive deployments, and timed delays
Available since v0.8.0.
Pause workflow execution for a specified duration - or poll a condition until it becomes true:
# fixed duration
- name: settle
func: wait
args:
duration: "5s"
message: "letting the deploy settle"
# outputs: elapsed_ms, elapsed_seconds, status
# poll until a condition is true (or fail at timeout)
- name: until_ready
func: wait
args:
condition: 'steps.health.status === "200"'
timeout: "30s"
interval: "1s"Pause workflow execution for a specified duration. Use for rate limiting, progressive deployments, and timed delays between operations.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
func | string | yes | Must be wait |
args.duration | string | one of | Fixed wait (e.g., 5s, 1m, 500ms) |
args.condition | string | one of | JS/template condition to poll until true |
args.timeout | string | no | Condition mode: give up after this long (default 30s; timeout fails the step) |
args.interval | string | no | Condition mode: poll frequency (default 1s) |
args.message | string | no | Logged while waiting (templates allowed) |
Provide either duration (fixed sleep) or condition (poll until true).
Duration Format
| Format | Example | Description |
|---|---|---|
Ns | 30s | N seconds |
Nm | 5m | N minutes |
Nms | 500ms | N milliseconds |
| Combined | 1m30s | 1 minute and 30 seconds |
Return Values
| Field | Type | Description |
|---|---|---|
result.output | string | Confirmation message with the waited duration |
result.elapsed_ms | number | Elapsed time in milliseconds |
result.elapsed_seconds | number | Elapsed time in seconds |
result.status | string | "success" |
Examples
Basic Delay
steps:
- name: deploy
func: shell
do: kubectl apply -f deployment.yml
- name: wait_for_rollout
func: wait
args:
duration: 30s
- name: health_check
func: http
args:
url: "https://{{ vars.env }}.example.com/health"
method: GETProgressive Deployment
steps:
- name: deploy_canary
func: shell
do: |
kubectl set image deployment/app app=app:{{ vars.version }}
kubectl scale deployment/app-canary --replicas=1
- name: observe_canary
func: wait
args:
duration: 5m
- name: check_canary
func: http
args:
url: "https://{{ vars.env }}.example.com/health"
method: GET
- name: verify_canary
func: assert
args:
condition: '{{ eq steps.check_canary.status_code 200 }}'
desc: "Canary must be healthy before full rollout"
- name: full_rollout
func: shell
do: kubectl scale deployment/app --replicas={{ vars.replicas }}Rate-Limited API Calls
steps:
- name: call_api
func: http
args:
url: "https://api.example.com/process"
method: POST
body:
batch: "{{ vars.batch_id }}"
- name: rate_limit_pause
func: wait
args:
duration: 1s
- name: call_api_2
func: http
args:
url: "https://api.example.com/process"
method: POST
body:
batch: "{{ vars.batch_id_2 }}"Post-Migration Stabilization
steps:
- name: run_migration
func: shell
do: python manage.py migrate
- name: stabilize
func: wait
args:
duration: 10s
- name: verify_schema
func: shell
do: python manage.py check --database defaultRun it
orchstep run