Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ScheduledTaskModule

Defines a task that is executed periodically or upon the start of the bot.

since

2.0.0

Hierarchy

Implemented by

Index

Methods

execute

  • execute(): Promise<any>
  • The method that gets executed periodically or on start, depending on the module's configuration.

    abstract
    since

    2.0.0

    Returns Promise<any>

    A promise that is used to determine if and when the task completes.

getRuntime

getSchedule

  • getSchedule(): string | number
  • Returns the schedule that specifies when this commands gets executed. This must be a cron-like string or a number in milliseconds. If this returns 0 or undefined or null, this task will never be scheduled to run.

    since

    2.0.0

    Returns string | number

onListen

  • onListen(): Promise<any>

onShutdown

  • onShutdown(): Promise<any>

shouldExecuteOnStart

  • shouldExecuteOnStart(): boolean

Generated using TypeDoc