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

# DurableTaskOptions

> Interface exported by @botmesh/core.

Defined in: [core/types.ts:361](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/types.ts#L361)

Options that make a `schedule`/`every`/`delay` task durable: its next run time is
persisted in the scheduler's `ScheduleStore` under `id`, so it survives restarts, and
each occurrence is claimed under a fenced lease so only one replica runs it.

## Properties

### id

```ts theme={null}
id: string;
```

Defined in: [core/types.ts:367](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/types.ts#L367)

Stable task id, unique per bot (the bot's store namespace is applied, so two bots
sharing a backend never collide). The schedule's state is keyed by it: keep it
stable across deploys. Registering the same id twice throws a `TypeError`.

***

### missed?

```ts theme={null}
missed?: MissedRunPolicy;
```

Defined in: [core/types.ts:369](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/types.ts#L369)

Policy for occurrences missed while no scheduler ran. Default `'skip'`.

***

### maxCatchUp?

```ts theme={null}
maxCatchUp?: number;
```

Defined in: [core/types.ts:371](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/types.ts#L371)

Most missed slots one `'catch-up'` runs. Default `10`. Positive integer.

***

### leaseMs?

```ts theme={null}
leaseMs?: string | number;
```

Defined in: [core/types.ts:377](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/types.ts#L377)

How long one claimed occurrence stays leased to this process: a duration (`'2m'`)
or ms. Renewed every third of it while the handler runs; a crashed runner's
occurrence is retried by another process once it expires. Default `'60s'`.

***

### timeZone?

```ts theme={null}
timeZone?: string;
```

Defined in: [core/types.ts:384](https://github.com/andresayac/botmesh/blob/main/packages/core/src/core/types.ts#L384)

Cron tasks only (a `TypeError` on `every`/`delay`): the IANA zone the cron fields are
read in, with the daylight-saving rules of [CronTaskOptions.timeZone](https://botmesh.afaya.com.co/api/core/interfaces/CronTaskOptions.md#timezone). Default:
`SchedulerOptions.timeZone`, else the process zone. The zone is part of the stored spec
(`TZ=<zone> <cron>`), so adding or changing it recomputes the task's next run.


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