fix(schedule): the daily prune prunes, and plans run on their schedule without a scheduled jobs table #57

Merged
james.maes merged 1 commits from fix/scheduled-prune into develop 2026-11-24 11:20:42 +00:00
1 Commits
Author SHA1 Message Date
James MaesandClaude Fable 5.2 2be9fc21db fix(schedule): the daily prune prunes, and plans run on their schedule without a scheduled jobs table
maven / build (push) Successful in 1m25s
build / maven (push) Successful in 1m25s
The daily prune never deleted anything. Its schedule was on "Prune per
retention" (backupPrune), an action for a person that needs plans selected
and a review; a scheduler that started it was told "No records were
selected", logged a warning and went on, every day, in every host.

- backupPruneScheduled (BackupScheduledPruneProcess) prunes every active
  plan to its retention with nobody selecting anything, once a day
- a plan that cannot be pruned raises backups.prune.failed, cleared by its
  next good prune, and does not stop the others
- backupPrune has no schedule now

Plans did not run on their schedule in an application with no scheduled
jobs table: the sync to scheduled jobs logged "ScheduledJob table not
found" and did nothing, so such a host had to build a scheduler itself.

- backupRunDuePlans (BackupDuePlansProcess), once a minute on the qbit's
  scheduler, starts every active plan whose cron has come due since it
  last started and every verification that has come due; missed times
  collapse into one run
- where the application has scheduled jobs it starts nothing
- only the scheduler may run it

Tests: the prune started as the scheduler starts it deletes what the
retention no longer keeps (the same call on the old schedule deleted
nothing); one plan's trouble does not stop the others; six tests of the
due-plans process. ./mvnw verify: 233 tests, guardrails, help coverage
and code coverage pass.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 05:19:03 -06:00