Documentation

sleep() function

Flux 0.36.0 – 0.123.0

The sleep() function was removed in Flux 0.123.0.

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

sleep(
  v: x,
  duration: 10s
)

Parameters

v

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 of tables. The examples below illustrate how.

duration

Length of time to delay execution.

Examples

Delay execution in a chained query

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

Delay execution using a stream variable

x = from(bucket: "example-bucket")
    |> range(start: -1h)

sleep(v: x, duration: 10s)

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.