Skip to main content

Class: abstract ScheduledTask<Task, Options>

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

new ScheduledTask()

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

Parameters

ParameterType
contextLoaderContext
optionsScheduledTaskOptions

Returns

ScheduledTask<Task, Options>

Overrides

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

Defined in

lib/structures/ScheduledTask.ts:19

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

Parameters

ParameterType
payloadundefined

Returns

unknown

Defined in

lib/structures/ScheduledTask.ts:27