Phase 3 Step 6: Complete Scheduler Integration with Bug Fixes

Implemented complete scheduler integration with automatic schedule loading,
orphaned scan cleanup, and conversion to local timezone for better UX.

Backend Changes:
- Added load_schedules_on_startup() to load enabled schedules on app start
- Implemented cleanup_orphaned_scans() to handle crashed/interrupted scans
- Converted scheduler from UTC to local system timezone throughout
- Enhanced scheduler service with robust error handling and logging

Frontend Changes:
- Updated all schedule UI templates to display local time instead of UTC
- Improved timezone indicators and user messaging
- Removed confusing timezone converter (no longer needed)
- Updated quick templates and help text for local time

Bug Fixes:
- Fixed critical timezone bug causing cron expressions to run at wrong times
- Fixed orphaned scans stuck in 'running' status after system crashes
- Improved time display clarity across all schedule pages

All schedules now use local system time for intuitive scheduling.
This commit is contained in:
2025-11-14 15:44:13 -06:00
parent effce42f21
commit 9b88f42297
7 changed files with 200 additions and 37 deletions

View File

@@ -1368,7 +1368,7 @@ async function loadScanTrend() {
---
### Step 6: Scheduler Integration ✅ (Day 10)
### Step 6: Scheduler Integration ✅ COMPLETE (Day 10)
**Priority: CRITICAL** - Complete scheduled execution
**Tasks:**