cron-vir - v0.1.0
    Preparing search index...

    Class RunningCrons<Context, Name>

    The return class from running cron jobs. Can be used to pause all crons, receive events, start specific crons, etc.

    Type Parameters

    • Context
    • Name extends string

    Hierarchy

    Index

    Constructors

    Properties

    context: Context
    crons: readonly Readonly<CronDefinition<Context, Name>>[]
    log: LoggerLogs
    options: Readonly<RunningCronsOptions> = {}
    pausedCrons: { [key: string]: boolean } = {}
    timeouts: { [key: string]: undefined | Readonly<Timeout> } = {}

    Methods

    • Clean up resources and stop all crons.

      Returns void

    • Pause a specific cron job.

      Parameters

      Returns boolean

      false if no cron by the given name was found or if the cron was already paused.

    • Resume a specific cron job.

      Parameters

      Returns boolean

      false if no cron by the given name was found or if the cron was already resumed.