Settle what the R10 scheduler and R11 log packages left open when they were
integrated (owner review 2, phase 2).
- Audit retention has one source of truth, the audit-cleanup schedule's age
limit. AuditRetentionDays defaults to 0 (the audit log is kept forever, so
an upgrade deletes nothing; the schedule is seeded off) and accepts 0-3650,
what a schedule's age limit takes. Saving Settings › Logs › Keep audit sets
the schedule's limit (on with a limit, off at 0) without a restart;
CHRONOS_AUDIT_RETENTION_DAYS locks it and Reset goes back to it.
- Both hosts scan right after start again, as their polling did: the server
after the scheduler starts, the desktop once the archive was reopened and
again when an unplugged one is back. Scheduler.RunSystemNowAsync runs the
archive-scan schedule when it is enabled and has not run since the start,
and skips while its scan is pending.
- Desktop scans follow Settings › Analysis › After a scan at every run: a scan
schedule without its own deep parameter asks the host
(IScheduleHost.DeepAnalysisAfterScan), the archive-scan schedule no longer
freezes the setting, and the editor offers deep only for analyses, so the
setting's tooltip stays true.
- The server's upload clean-up runs every 6 hours instead of every 30
minutes, to keep the job history readable; idle uploads still expire after
UploadRetentionHours.
- The Unraid template and docker-compose leave CHRONOS_LOG_LEVEL empty or
commented out, and say that setting it locks both log levels, so the admin
panel can change them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner review 2, R10: nothing may run out of sight, so every timer the server
ran becomes a system schedule the admin panel shows and manages, and
administrators create their own.
- SchedulerHost runs the shared Scheduler on the job engine (started after
JobEngineHost, stopped before it); ServerScheduleHost gives it the
container's time zone (UTC with a warning when TZ is unknown), the archive
refreshed from archive.json at every run (what ArchivePolling did), the
clean-up steps and the system schedules: archive-scan every 10 minutes
(no catch-up, also run once at start like the polling), upload-cleanup
every 30 minutes, index-backup at 03:00 (SQLite only), housekeeping (job
history) at 04:00 and audit-cleanup at 04:30.
- ArchivePolling and DatabaseBackupService are gone; UploadMaintenance only
recovers commits at start, its sweep is the "uploads" clean-up step.
- /api/v1/schedules (ManageArchive, audited): list with actions and time
zone, create, PUT/PATCH, delete (409 schedule_system), run now (409
schedule_pending), reset (409 schedule_no_defaults), runs paged by cursor;
invalid fields are 400 invalid_schedule naming the field.
- CHRONOS_AUDIT_RETENTION_DAYS (AuditRetentionDays, default 365) seeds the
audit clean-up; set by the environment it is applied at every start and
locked. Job history leaves Settings: it is the housekeeping schedule's age
limit, and the setting is what a reset restores.
- Admin panel: Jobs has Queue and Scheduled tabs; schedules with when (in
the panel's language and the server's zone), next run, last result, a
switch, Run now, Edit, Delete or Reset, their runs linking to the jobs, and
a side panel for the action, recurrence and parameters; job rows a
schedule queued carry a Scheduled pill. Strings in en and it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 808ce94ae29e3bf4522cb4d40dfd76d4f8529c64)