@mtakla/cronops
    Preparing search index...

    Hierarchy

    • AbstractTask<void>
      • JobScheduler
    Index

    Constructors

    Accessors

    Methods

    • Parameters

      • timeout: number = 1000

      Returns Promise<void>

    • Emitted if job schedule has been changed (checked every 5 seconds)

      Parameters

      • cb: (initialConfig: boolean) => void

        callback function

      Returns void

    • Parameters

      • cb: (error: Error) => void

      Returns void

    • Parameters

      • cb: () => void

      Returns void

    • Type Parameters

      • T

      Parameters

      • cb: (result: T) => void

      Returns void

    • Emitted if there was any kind of activity during job execution. The activity parameter can have the followings values:

      • EXECUTED: a command has been executed (globally or on a selected source file)
      • COPIED: a source file has been copied to path
      • DELETED: a source file (path) has been deleted by the Job
      • ARCHIVED: selected source files has been archived to path
      • PRUNED : a target file (path) has been pruned due to expired retention Note: Activity events are ony emitted, if job config property verbose is set to true

      Parameters

      • cb: (job: Job, activity: string, path: string, count: number) => void

        callback

      Returns void

    • Emitted if any error occurred during job execution

      Parameters

      • cb: (job: Job, err: Error) => void

        callback

      Returns void

    • Emitted if manual job execution has been started via executeJob(). Note: This event is not emitted, if the job is paused or already running

      Parameters

      • cb: (job: Job) => void

        callback

      Returns void

    • Emitted if the job has been successfully scheduled

      Parameters

      • cb: (job: Job, rescheduled: boolean) => void

        callback

      Returns void

    • Emitted if the job has been started by scheduler or triggered manually via executeJob()

      Parameters

      • cb: (job: Job) => void

        callback

      Returns void

    • Parameters

      • cb: () => void

      Returns void

    • Parameters

      • cb: () => void

      Returns void

    • Parameters

      • runImmediately: boolean = false

      Returns void

    • Schedules a single job

      Parameters

      • job: Job

        job definition

      Returns void

      JobError if job definition is not valid

      JobError if Job config is not valid

    • Parameters

      • jobs: Job[]
      • Optionalcb: (count: number) => void

      Returns void