Skip to main content

Class: abstract ScheduledTask<Task, Options>

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

Abstract

Extends

  • Piece<Options, "scheduled-tasks">

Type parameters

Type parameterValue
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

Source

lib/structures/ScheduledTask.ts:19

Properties

customJobOptions?

optional readonly customJobOptions: ScheduledTaskCustomJobOptions

Source

lib/structures/ScheduledTask.ts:17


interval

readonly interval: null | number

Source

lib/structures/ScheduledTask.ts:14


pattern

readonly pattern: null | string

Source

lib/structures/ScheduledTask.ts:15


timezone

readonly timezone: string

Source

lib/structures/ScheduledTask.ts:16

Methods

run()

abstract run(payload: undefined): unknown

Parameters

ParameterType
payloadundefined

Returns

unknown

Source

lib/structures/ScheduledTask.ts:27