Base class for recurring tasks, which are supposed to be executed at a certain weekday & time each week.

Hierarchy

Constructors

Properties

Methods

Constructors

  • Creates a new recurring task, which will always get run at the specified day & time.

    Parameters

    • weekday: Weekday

      Weekday on which the task should run

    • hour: number

      Hour which the task should run

    • minute: number

      Minute which the task should run

    • runner: TaskExecutor

      Function to execute

    • Optional functionArguments: unknown[]

      Array of additional parameters to pass to the runner function

    Returns RecurringTask

Properties

arguments: unknown[]
hour: number
minute: number
runner: TaskExecutor
weekday: Weekday

Methods

  • Runs this recurring task and catches exceptions.

    Parameters

    • client: Client<boolean>

      Client to run the task with

    Returns Promise<void>

  • Checks whether this task should be executed at the given time

    Returns

    Whether the task should be executed

    Parameters

    • time: DateTime

      Time to check against

    Returns boolean

Generated using TypeDoc