Interface CronjobInterface

An interface describing a cronjob

interface CronjobInterface {
    name: string;
    spec: string;
    tz?: string;
    handler: ((log) => Promise<boolean>);
    overwrite?: boolean;
}

Properties

name: string

The name of the job

spec: string
tz?: string

The timezone in which to operate. Defaults to system timezone. See https://github.com/moment/luxon/blob/master/docs/zones.md#specifying-a-zone for options.

handler: ((log) => Promise<boolean>)

The job to run

Type declaration

    • (log): Promise<boolean>
    • The job to run

      Parameters

      • log: SimpleLoggerInterface

      Returns Promise<boolean>

overwrite?: boolean

A flag indicating that this job should overwrite another job in the crontab already registered with this name. If this flag is not passed and this job has the same name as another job already registered, the system will log a warning and add a suffix to the name to avoid collision.

Generated using TypeDoc