Kaizen
Browse modulesInsightsinsights/schedulingFunctions

Function: upsertReportSchedule()

function upsertReportSchedule(queue: ReportScheduleQueue, schedule: ReportScheduleRegistration): Promise<void>;

Defined in: server/insights/scheduling/report-schedule-queue.ts:106

Register (or update) the repeating job for one schedule. The BullMQ job scheduler id IS the schedule row id, so an upsert is idempotent — re-running it after a config change simply re-points the same scheduler at the new pattern. Throws if the (custom) cron pattern is one BullMQ's cron-parser rejects; the caller maps that to a validation error.

Parameters

Returns

Promise<void>

On this page