1.0 KiB
1.0 KiB
title | description | aliases | menu | weight | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
sleep() function | The `sleep()` function delays execution by a specified duration. |
|
|
401 |
The sleep()
function delays execution by a specified duration.
Function type: Miscellaneous
sleep(
v: x,
duration: 10s
)
Parameters
v
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
duration
The length of time to delay execution.
Data type: Duration
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)