# Sleep `step.sleep()`
Source: https://www.inngest.com/docs/reference/functions/step-sleep

## `step.sleep(id, duration): Promise`

<Row>
  <Col>
    <Properties>
      <Property name="id" type="string" required>
        The ID of the step. This will be what appears in your function's logs and is used to memoize step state across function versions.
      </Property>
      <Property name="duration" type="number | string | Temporal.Duration" required>
        The duration of time to sleep:

        * `number` of milliseconds
        * `string` compatible with the [ms](https://npm.im/ms) package, e.g. `"30m"`, `"3 hours"`, or `"2.5d"`
        * <VersionBadge version="3.33.0+" /> [`Temporal.Duration`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration)
      </Property>
    </Properties>
  </Col>
  <Col>
  <CodeGroup>
  ```ts {{ title: "v3" }}
  // Sleep for 30 minutes
  Temporal.Duration.from({ minutes: 30 });
  await step.sleep("wait-with-temporal", thirtyMins);

  await step.sleep("wait-with-string", "30m");
  await step.sleep("wait-with-string-alt", "30 minutes");
  await step.sleep("wait-with-ms", 30 * 60 * 1000);
  ```
  ```ts {{ title: "v2" }}
  // Sleep for 30 minutes
  await step.sleep("30m");
  await step.sleep("30 minutes");
  await step.sleep(30 * 60 * 1000);
  ```
  </CodeGroup>
  </Col>
</Row>

<Callout>
  `step.sleep()` must be called using `await` or some other Promise handler to ensure your function sleeps correctly.
</Callout>