Skip to main content
context.sleep() pauses workflow execution for a specified duration. When a workflow is paused, the current request completes and a new one is automatically scheduled to resume after the delay. This ensures no compute resources are consumed during the sleep period.
Always await a sleep step to properly pause execution.

Arguments

stepName
string
A unique identifier for the step.
duration
number|string
The duration to pause workflow execution.
  • Human-readable string format:
  • Numeric format (seconds):

Usage