> ## 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.

# ScheduleRecord

> Interface exported by @botmesh/core/spi.

Defined in: [scheduler/ScheduleStore.ts:28](https://github.com/andresayac/botmesh/blob/main/packages/core/src/scheduler/ScheduleStore.ts#L28)

Persisted state of one durable task.

## Properties

### id

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

Defined in: [scheduler/ScheduleStore.ts:29](https://github.com/andresayac/botmesh/blob/main/packages/core/src/scheduler/ScheduleStore.ts#L29)

***

### kind

```ts theme={null}
kind: ScheduleKind;
```

Defined in: [scheduler/ScheduleStore.ts:30](https://github.com/andresayac/botmesh/blob/main/packages/core/src/scheduler/ScheduleStore.ts#L30)

***

### spec

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

Defined in: [scheduler/ScheduleStore.ts:35](https://github.com/andresayac/botmesh/blob/main/packages/core/src/scheduler/ScheduleStore.ts#L35)

Cron expression, interval in ms, or one-shot delay in ms (as a string). A cron task
with a time zone stores `TZ=<zone> <cron>` (an opaque string for the store).

***

### nextRunAt

```ts theme={null}
nextRunAt: number | null;
```

Defined in: [scheduler/ScheduleStore.ts:37](https://github.com/andresayac/botmesh/blob/main/packages/core/src/scheduler/ScheduleStore.ts#L37)

Epoch ms of the next occurrence; `null` once a one-shot task has run (a tombstone).

***

### lastRunAt?

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

Defined in: [scheduler/ScheduleStore.ts:38](https://github.com/andresayac/botmesh/blob/main/packages/core/src/scheduler/ScheduleStore.ts#L38)

***

### lastStatus?

```ts theme={null}
lastStatus?: "ok" | "error";
```

Defined in: [scheduler/ScheduleStore.ts:39](https://github.com/andresayac/botmesh/blob/main/packages/core/src/scheduler/ScheduleStore.ts#L39)

***

### fencingToken

```ts theme={null}
fencingToken: number;
```

Defined in: [scheduler/ScheduleStore.ts:44](https://github.com/andresayac/botmesh/blob/main/packages/core/src/scheduler/ScheduleStore.ts#L44)

Bumped by every successful [ScheduleStore.claimDue](https://botmesh.afaya.com.co/api/core/interfaces/ScheduleStore.md#claimdue); starts at 0 for a new id.
Never goes backwards for an id, even across `delete` and a new `register`.

***

### leaseOwner?

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

Defined in: [scheduler/ScheduleStore.ts:45](https://github.com/andresayac/botmesh/blob/main/packages/core/src/scheduler/ScheduleStore.ts#L45)

***

### leaseUntil?

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

Defined in: [scheduler/ScheduleStore.ts:46](https://github.com/andresayac/botmesh/blob/main/packages/core/src/scheduler/ScheduleStore.ts#L46)

***

### updatedAt

```ts theme={null}
updatedAt: number;
```

Defined in: [scheduler/ScheduleStore.ts:47](https://github.com/andresayac/botmesh/blob/main/packages/core/src/scheduler/ScheduleStore.ts#L47)


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