Skip to navigation
Calling

sleep

View as MarkdownOpen in Claude

Set the amount of time for the current application to sleep for in milliseconds before continuing to the next action.

sleep
object | integer | stringRequired

An object that accepts the following properties, an integer value directly, or a SWML variable reference (string) that resolves to a valid duration.

Properties

sleep.duration
integer | stringRequired

The amount of time to sleep in milliseconds. Must be a positive integer. Can also be set to a -1 integer for the sleep to never end.

Also accepts a SWML variable reference (string) such as ${vars.wait_ms} or %{vars.wait_ms}. The reference is substituted when the method runs and must resolve to a positive integer or -1.

Possible Values: -1 or any positive integer

Examples

Timed Sleep Example

version: 1.0.0
sections:
main:
- sleep: 5000

Forever Sleep Example

version: 1.0.0
sections:
main:
- sleep: -1