Skip to content
Français

TriggerSchedule

import type { TriggerSchedule } from "@elie-laloum/outpost";
  • nameRequired
    string
    Stable name of 1 to 128 letters, digits, dots, underscores or hyphens; part of each job identifier.
  • cronRequired
    CronSchedule
    Schedule created with createCronSchedule().
  • handlerRequired
    string
    Queue worker handler receiving the jobs, usually a defineWorkflowJob().
  • runIdOptional
    ((slot: Date) => string) | undefined
    Derive the checkpoint run of a slot; defaults to <name>:<slot ISO time>. Return the same value for a slot on every replica, or the queue refuses the later publication.
  • inputOptional
    ((slot: Date) => WorkflowJson) | undefined
    Derive the JSON input of a slot; defaults to null. Return the same value for a slot on every replica, or the queue refuses the later publication.
export interface TriggerSchedule {
  /** Stable name; part of each slot's queue job identifier. */
  readonly name: string;
  readonly cron: CronSchedule;
  readonly handler: string;
  /** Defaults to `<name>:<slot ISO time>`. */
  readonly runId?: (slot: Date) => string;
  /** Defaults to `null`. */
  readonly input?: (slot: Date) => WorkflowJson;
}