# Timeout

Timeout for a task or heartbeat.

- Source: [`aws-stepfunctions/lib/states/task-base.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-stepfunctions/lib/states/task-base.ts#L418)
- Type last changed: v2.178.0 · 6 Feb 2025

## Example

```ts
new tasks.GlueStartJobRun(this, 'Task', {
  glueJobName: 'my-glue-job',
  arguments: sfn.TaskInput.fromObject({
    key: 'value',
  }),
  taskTimeout: sfn.Timeout.duration(Duration.minutes(30)),
  notifyDelayAfter: Duration.minutes(5),
});
```

## Initializer

```ts
new Timeout()
```

## Properties

- `jsonataExpression`: string — JSONata expression for this timeout.

- `path`: string — Path for this timeout.

- `seconds`: number — Seconds for this timeout.

## Methods

- `at(path: string): Timeout // chainable` (static) — Use a dynamic timeout specified by a path in the state input.

  The path must select a field whose value is a positive integer.

- `duration(duration: Duration): Timeout // chainable` (static) — Use a duration as timeout.

- `jsonata(jsonataExpression: string): Timeout // chainable` (static) — Use a dynamic timeout specified by a JSONata expression.

  The JSONata expression value must be a positive integer.
