Class Job

Hierarchy

  • Job

Constructors

  • Constructor.

    Parameters

    • parent: Cron

      Parent cron instance.

    • name: string

      Job name.

    • config: JobConfig

      Job configuration.

    Returns Job

Methods

  • Destroy the job.

    This will stop the job if it is running and remove it from the parent cron instance.

    Returns void

  • Get the number of iterations this job has run.

    Returns number

    number of iterations.

  • Returns boolean

  • Run the job.

    Returns Promise<void>

  • Check if the job should run at the given time.

    Parameters

    • d: Date

      Date to check.

    Returns boolean

    true if the job should run, false otherwise.

  • Start/restart the job.

    Returns void

  • Stop the job.

    Returns void

Generated using TypeDoc