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 Parameter | Default type |
---|---|
Task extends ScheduledTasksKeys | ScheduledTasksKeys |
Options extends Options | Options |
Constructors
new ScheduledTask()
new ScheduledTask<
Task
,Options
>(context
:LoaderContext
,options
:ScheduledTaskOptions
):ScheduledTask
<Task
,Options
>
Parameters
Parameter | Type |
---|---|
context | LoaderContext |
options | ScheduledTaskOptions |
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
Parameter | Type |
---|---|
payload | undefined |
Returns
unknown