sleep() function

Warning! This page documents an earlier version of Flux, which is no longer actively developed. Flux v0.65 is the most recent stable version of Flux.

The sleep() function delays execution by a specified duration.

Function type: Miscellaneous

  v: x,
  duration: 10s



Defines input tables. sleep() accepts piped-forward data and passes it on unmodified after the specified duration. If data is not piped-forward into sleep(), set v to specify a stream object. The examples below illustrate how.

Data type: Object


The length of time to delay execution.

Data type: Duration


Delay execution in a chained query

from(bucket: "telegraf/autogen")
  |> range(start: -1h)
  |> sleep(duration: 10s)

Delay execution using a stream variable

x = from(bucket: "telegraf/autogen")
    |> range(start: -1h)

sleep(v: x, duration: 10s)