Skip to content

Delay

Type key: DelayNode
Group: Flow Control
Category: flow
Tier: CORE

The Delay node pauses workflow execution for a specified duration before passing data to the next node. It is a blocking pause — the queue worker process sleeps for the configured time.

Handles

HandleDirectionDescription
inputInputReceives data from the preceding node
outputOutputPasses input data unchanged after the delay

Configuration

FieldTypeDefaultDescription
durationinteger5The duration to wait
unitenumsecondsUnit of time: milliseconds, seconds, minutes, hours

Behavior

  1. The node calculates the total wait time in microseconds
  2. If the delay exceeds 25 seconds, set_time_limit() is automatically extended to prevent PHP execution timeouts
  3. usleep() is called for the calculated duration
  4. The original input data is returned unchanged via ExecutionResult::success($context->input)

Duration Reference

ConfigurationActual wait
5 seconds5 s
500 milliseconds0.5 s
2 minutes120 s
1 hour3600 s

When to Use

  • Rate limiting: Pause between iterations in a For Each loop to avoid hitting API rate limits
    For Each → [HTTP Request] → Delay (500ms) → next iteration
  • Staggered notifications: Wait before sending a follow-up email
    Send Mail (welcome) → Delay (3 days) → Send Mail (tips)
    Note: For delays measured in days, a queue-based approach (re-scheduling the job) is more appropriate than blocking usleep
  • External service warm-up: Brief pause after triggering an async external action before checking its status

Performance Warning

The Delay node uses usleep(), which blocks the queue worker process for the entire duration. For delays longer than a few seconds in production:

  • Ensure you have enough queue worker processes to handle other workflows concurrently
  • Consider using Laravel's dispatchAfterResponse() or re-dispatching the job with a delay as an alternative for very long waits

Notes

  • The minimum meaningful delay is ~1 millisecond (OS scheduler dependent)
  • Data passes through unchanged — the Delay node is a pure timing node with no data transformation
  • Nested Delays (Delay inside a For Each) accumulate: 1000 items × 500ms = ~8.3 minutes total

Proprietary software — source-available. All rights reserved.