Skip to main content
The Sleep command (Command Type: 1008) introduces a configurable delay in the execution pipeline. It is available in the parse scraper context and is useful for rate limiting or waiting between steps.

Overview

The Sleep command provides functionality for:
  • Pausing execution for a specified number of milliseconds
  • Rate limiting command execution to avoid overloading downstream systems
  • Adding deliberate delays between processing steps

Command Type

Command Type ID: 1008

Parameters

ParameterTypeDescriptionRequired
timenumberThe duration of the pause in millisecondsYes

Usage Examples

1 Second Delay

{
  "command": "sleep",
  "params": {
    "time": 1000
  }
}

500ms Delay

{
  "command": "sleep",
  "params": {
    "time": 500
  }
}

5 Second Delay

{
  "command": "sleep",
  "params": {
    "time": 5000
  }
}

Common Use Cases

  • Rate Limiting: Slow down processing to respect API rate limits
  • Polling Intervals: Wait between polling cycles in scraper pipelines
  • Debouncing: Introduce a delay before processing rapidly arriving updates