Skip to main content

Abstract Class: ScheduledTask<Task, Options>

Defined in: lib/structures/ScheduledTask.ts:10

Represents a scheduled task that can be run at a specified interval or pattern.

Extends​

  • Piece<Options, "scheduled-tasks">

Type Parameters​

Type ParameterDefault type
Task extends ScheduledTasksKeysScheduledTasksKeys
Options extends OptionsOptions

Constructors​

Constructor​

new ScheduledTask<Task, Options>(context: LoaderContext, options: ScheduledTaskOptions): ScheduledTask<Task, Options>

Defined in: lib/structures/ScheduledTask.ts:19

Parameters​

ParameterType
contextLoaderContext
optionsScheduledTaskOptions

Returns​

ScheduledTask<Task, Options>

Overrides​

Piece<Options, 'scheduled-tasks'>.constructor

Properties​

customJobOptions?​

readonly optional customJobOptions: ScheduledTaskCustomJobOptions

Defined in: lib/structures/ScheduledTask.ts:17


interval​

readonly interval: null | number

Defined in: lib/structures/ScheduledTask.ts:14


pattern​

readonly pattern: null | string

Defined in: lib/structures/ScheduledTask.ts:15


timezone​

readonly timezone: string

Defined in: lib/structures/ScheduledTask.ts:16

Methods​

run()​

abstract run(payload: undefined): unknown

Defined in: lib/structures/ScheduledTask.ts:27

Parameters​

ParameterType
payloadundefined

Returns​

unknown