Task: Add scheduling support
This page documents a task in the Scheduling subsystem story. It captures the goal, current status, acceptance, and any notes or results.
Goal
Build the ores.scheduler library wrapping pg_cron with a Quartz.NET-style fluent API.
Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | Scheduling subsystem |
| Now | Completed 2026-02-27. |
| Waiting on | None. |
| Next | None. |
| Last touched | 2026-02-27 |
Acceptance
- Domain types:
cron_expression(croncpp-backed,std::expectederrors),job_status,job_definition,job_instance. - Fluent builder:
job_definition_builderwithwith_name/with_command/with_cron_schedule. cron_schedulerservice: invokescron.schedule/cron.unschedulevia sqlgen.ores_scheduler_job_definitions_tblhand-crafted (cron_job_id bigint, is_active integer don't fit the standard codegen templates); linked tocron.jobviacron_job_id.- Job instances read directly from
cron.job_run_detailsvia raw SQL join (no mirror table needed in Phase 1). description+is_activecolumns included for the future UI.cron_expressionbridges pg_cron's 5-field Unix format and croncpp's 6-field format transparently.
Plan
Captured during execution; cleared into the parent story on close.
Notes
Quartz.NET pattern with all state in the DB: job_definition = persistent plan, job_instance = historical execution.
Result
Scheduling library available end-to-end.