Skip to main content

Enumeration: ScheduledTaskEvents

@sapphire/plugin-scheduled-tasks.ScheduledTaskEvents

Events emitted during the process setting up the scheduler and running a task. You can use these events to trace the progress for debugging purposes.

Enumeration members

ScheduledTaskError

ScheduledTaskError = "scheduledTaskError"

Event that is emitted when a task's "run" method throws an error

param The error what occurred during the run

param The name of the task what tried to run

param The duration what indicates how long running the task took

param The payload of the task

Defined in

projects/plugins/packages/scheduled-tasks/src/lib/types/ScheduledTaskEvents.ts:22


ScheduledTaskFinished

ScheduledTaskFinished = "scheduledTaskFinished"

Event that is emitted when a task's "run" method finishes, regardless of whether an error occurred or not

param The name of the task what tried to run

param The duration what indicates how long running the task took

param The payload of the task

Defined in

projects/plugins/packages/scheduled-tasks/src/lib/types/ScheduledTaskEvents.ts:35


ScheduledTaskNotFound

ScheduledTaskNotFound = "scheduledTaskNotFound"

Event that is emitted if a task piece is not found in the store

param The name of the task what tried to run

param The payload of the task

Defined in

projects/plugins/packages/scheduled-tasks/src/lib/types/ScheduledTaskEvents.ts:10


ScheduledTaskRun

ScheduledTaskRun = "scheduledTaskRun"

Event that is emitted before a task's "run" method is called

param The name of the task what tried to run

param The payload of the task

Defined in

projects/plugins/packages/scheduled-tasks/src/lib/types/ScheduledTaskEvents.ts:15


ScheduledTaskStrategyConnectError

ScheduledTaskStrategyConnectError = "scheduledTaskStrategyConnectError"

Event that is emitted when the scheduler fails to connect to the server (i.e. redis or sqs)

param The error occurred the connection

Defined in

projects/plugins/packages/scheduled-tasks/src/lib/types/ScheduledTaskEvents.ts:39


ScheduledTaskSuccess

ScheduledTaskSuccess = "scheduledTaskSuccess"

Event that is emitted when a tasks's "run" method is successful

param The name of the task what tried to run

param The payload of the task

param The result of the run

param The duration what indicates how long running the task took

Defined in

projects/plugins/packages/scheduled-tasks/src/lib/types/ScheduledTaskEvents.ts:29