Preserve custom weekday schedules and prevent retroactive overdue classification after edits
Problem and user impact
A forum report shows a successful backup marked overdue after the user adjusted job schedules. Investigation also found that opening a multi-weekday cron schedule in the editor can misclassify it as a single-weekday schedule and leave a stale next-run preview.
These problems can confuse users about backup health and can unintentionally change the configured weekdays when saving an incorrectly classified schedule.
Reported evidence
- Cron expression shown:
15 3 * * 1,3,5(Monday, Wednesday, Friday at 03:15). - The successful run on 2026-09-28 started at 01:30:03, completed at 01:40:05, and saved its success status at 01:40:09.
- The widget cache update was logged at 01:40:10.
- The dashboard displayed an overdue threshold of 2026-09-28 09:15 and a next run of 2026-09-30 03:15.
- The schedule dialog displayed 2026-10-05 03:15 while showing the multi-weekday expression.
- The user subsequently said they believe they moved the backup maintenance window and adjusted the jobs. They will observe subsequent runs.
The exact previous schedule, edit time, installed version, and timezone configuration remain unconfirmed. The user did not confirm that the previous cron time was 01:30. No backup-engine failure is established by this report.
Confirmed source findings
Multi-weekday editor and stale preview
In ui/js/pages/jobs.js:
parseCronToFrequency()classifies15 3 * * 1,3,5as weekly and reduces the weekday field withparseInt, retaining only Monday.showScheduleModal()uses that classification to initialize the editor and preview.buildCronExpression()builds a single-weekday expression in weekly mode. Saving without correcting the mode can therefore lose Wednesday and Friday.setFrequency()does not refresh the preview when switching to custom mode. The restored custom expression can appear beside the previous Monday-only preview.calcNextRun()itself supports comma-separated weekdays; the editor interpretation and preview lifecycle need to be corrected.
Schedule-change handling in overdue detection
In api/notification_reminder_api.py, _backup_overdue_item() compares the last status timestamp with the latest expected occurrence of the currently stored cron expression. api/schedule_api.py::save_schedule() stores cron and enabled state without a schedule-effective timestamp or revision history.
A read-only reproduction on origin/main, using a successful status timestamp of 2026-09-28 01:40:09, an evaluation time of 2026-09-29 12:00, and the default six-hour tolerance, produced:
15 3 * * 1,3,5: overdue, expected occurrence 2026-09-28 03:15, threshold 09:15, next run 2026-09-30 03:15.- Hypothetical previous schedule
30 1 * * 1,3,5: current, next run 2026-09-30 01:30.
This reproduces the reported classification. It does not prove the actual previous schedule. Without schedule-effective metadata, changing a schedule after a completed run can retroactively introduce an expected occurrence that was never applicable.
Proposed scope
- Preserve multi-weekday and other custom cron expressions when opening and saving the editor. Use a preset only when it can represent the expression without loss.
- Recompute next-run preview whenever the frequency mode or expression changes.
- Define schedule-effective behavior for overdue evaluation so a new schedule does not retroactively invent missed runs before it became applicable.
- Distinguish an actual schedule change from a no-op save; saving unchanged settings must not clear a genuine overdue condition.
- Define handling of existing schedules without effective-time metadata, enable/disable transitions, and failed crontab application. Preserve existing data and follow repository migration rules if persisted metadata changes are required.
- Keep genuine missed-run detection and configured tolerance functional. Do not solve this by globally increasing tolerance or treating every recent successful backup as satisfying a later scheduled occurrence.
Acceptance criteria and validation
- Opening and saving
15 3 * * 1,3,5preserves all three weekdays. - Switching between preset and custom modes immediately updates the preview.
- At a fixed reference time of 2026-09-29 12:00, the above expression previews 2026-09-30 03:15 in both editor and dashboard.
- A defined schedule-change scenario after a successful run does not retroactively flag a never-applicable occurrence.
- A genuinely missed occurrence under an unchanged effective schedule becomes overdue after the configured tolerance.
- No-op saves do not reset overdue detection.
- Tests cover existing records, enable/disable behavior, and failure to apply a saved schedule, as appropriate to the chosen implementation.
- User-facing documentation and a pending release-note fragment describe the resulting behavior.
Tracking
Related: #546, which covers widget freshness, status categories, and theme contrast. This issue addresses schedule editing and overdue semantics separately.
Current authorization is investigation and issue creation only. No implementation, test-channel build, or release has been performed for this issue.