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

# ScheduledTask

> Interface exported by @botmesh/core.

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

Handle of a task registered with `bot.schedule`, `bot.every` or `bot.delay`.

## Properties

### id

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

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

***

### cron?

```ts theme={null}
readonly cron?: string;
```

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

***

### interval?

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

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

***

### runAt?

```ts theme={null}
readonly runAt?: Date;
```

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

***

### nextRun

```ts theme={null}
readonly nextRun: Date | null;
```

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

***

### isRecurring

```ts theme={null}
readonly isRecurring: boolean;
```

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

***

### durable?

```ts theme={null}
readonly durable?: boolean;
```

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

`true` for a durable task (registered with [DurableTaskOptions](https://botmesh.afaya.com.co/api/core/interfaces/DurableTaskOptions.md)): its schedule
lives in a `ScheduleStore`, and `cancel()` also deletes the stored row. Absent on
in-memory tasks.

***

### timeZone?

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

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

The IANA zone a cron task's fields are read in (`CronTaskOptions.timeZone`,
`DurableTaskOptions.timeZone` or `SchedulerOptions.timeZone`). Absent when they are
read in the process zone, and on interval and one-shot tasks.

## Methods

### cancel()

```ts theme={null}
cancel(): void;
```

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

#### Returns

`void`


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