Sleep / Wait

BlockTime

Pause the flow for a specified duration.

Duration is a sequence of numbers with unit suffix (s, m, h). Examples: "5s", "30s", "1m30s". Plain numbers are treated as seconds.

Inputs

DurationRequired

How long to sleep (e.g. 5s, 1m, 30s). Plain numbers are treated as seconds.

Example: 5s

Outputs

Slept (Seconds)

Actual number of seconds the block slept.

Example: 5

Slept (Milliseconds)

Actual number of milliseconds the block slept.

Example: 5000

Build a bot using blocks like Sleep / Wait

Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.

Advanced Documentation

This documentation can be useful when using code mode. View as Markdown

ID: sleep_wait

Inputs

FieldInventScript nameValue
Durationduratione.g. "5s"

Outputs

FieldInventScript nameValue
Slept (Seconds)slept_secondse.g. "5"
Slept (Milliseconds)slept_millisecondse.g. "5000"

Example InventScript

sleepWait := sleep_wait(Args{duration: "5s"})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "Slept (Seconds): " + sleepWait.slept_seconds,
})

More time blocks