> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nelkap.com/llms.txt
> Use this file to discover all available pages before exploring further.

# step.sleep

> Pause the run for a duration.

```ts theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
nelkap.step.sleep(duration: string): Promise<void>
```

## Parameters

**duration** `string` *required*

A count and a unit, like `30 minutes` or `1 day`: second, minute, hour, day, week, month, or year, with or without an s. Up to a year. Months and years follow the calendar.

## Behavior

* The run sleeps, and the call ends. Nelkap calls your app again once the time is up.
* The sleep takes its duration as its name, so two sleeps of `1 day` are matched in order.
* A duration of zero goes on at once.

## Errors

| Error | When |
| - | - |
| `Error` | The duration isn't a count and a unit, or it was called outside a run. |
| `NelkapError` `badRequest` | The duration is longer than a year. |

## Example

```ts theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
await nelkap.step.sleep('1 day');
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.