Skip to content

ADR-0053 Phase 2 · Slice 6: activate report-schedule cron + timezone (liveness enforce) #1983

Description

@os-zhuang

Part of ADR-0053 Phase 2. Design: #1975 · Parent: #1928. Liveness tie-in: ADR-0049 enforce-or-remove.

Slice 6 of 6 — self-contained; doubles as liveness cleanup. Activate report-schedule cron + timezone.

Decision D3 (see #1975)

Wire report schedules onto the existing CronJobAdapter (croner + per-job timezone, already used by sys_job) — do not delete the dormant fields.

Problem

sys-report-schedule.object.ts:12-15 documents cron_expression as "reserved for the next milestone when a cron-capable scheduler adapter is available, it wins over interval_minutes." That adapter exists — packages/services/service-job/src/cron-job-adapter.ts:55-59. But report-service.ts advanceSchedule reads only interval_minutes and ignores both cron_expression (sys-report-schedule.object.ts:72-76) and timezone (:80) — packages/plugins/plugin-reports/src/report-service.ts:462-467. Both are author-facing-but-runtime-dead.

Scope

  • When cron_expression is present, schedule the report via CronJobAdapter with the schedule's timezone; keep interval_minutes as the tz-agnostic fallback.
  • Report schedules run SYSTEM_CTX (no user) — tz source is the schedule's own timezone field, same model as sys_job. Off the resolver's critical path.
  • Update the spec-liveness ledger: mark cron_expression + timezone live, with this PR as evidence (enforce, not remove).

Acceptance criteria

  • A report with cron_expression: '0 9 * * 1' + timezone: 'America/New_York' fires Mondays 09:00 ET.
  • interval_minutes-only schedules unchanged.
  • Liveness ledger reflects the two fields as live; no authorWarn regression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority:p3Low: nice-to-have, backlog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions