sleep() function

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

Data type: Record


The length of time to delay execution.

Data type: Duration


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)

New! Cloud or OSS?

InfluxDB OSS 2.0 release candidate 0

InfluxDB OSS v2.0.rc0 includes breaking changes that require a manual upgrade from all alpha and beta versions. For information, see:

Upgrade to InfluxDB OSS v2.0.rc0