Sleep

Create an Airplane sleep for a specified duration.
Airplane's Sleep SDK makes it easy to pause a run. See Sleep documentation for a high-level overview. This works best within the workflow runtime where your task will not consume resources while sleeping.

Sleep

The sleep API takes in a duration as a millisecond formatted string and returns a promise that resolves when the sleep finishes.
typescript
Copied
1
await airplane.sleep("7d");
airplane.sleep(duration)
duration
string

The duration of time to sleep. Can be a ms formatted string or millisecond number.