feat: next run countdown in auto-cycle config
- auto_cycle.py: next_run_at now set to future timestamp (now + interval) instead of current time — was always showing wrong value - Config.tsx: NextRunCountdown component shows live countdown (updates every second) + absolute local time, only visible when auto-cycle enabled Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -744,9 +744,10 @@ def _scheduler_loop(stop_event: threading.Event):
|
||||
interval_hours = 3.0
|
||||
|
||||
_current_status["interval_hours"] = interval_hours
|
||||
next_run = datetime.utcnow().isoformat()
|
||||
from datetime import timedelta
|
||||
next_run = (datetime.utcnow() + timedelta(hours=interval_hours)).isoformat()
|
||||
_current_status["next_run_at"] = next_run
|
||||
logger.info(f"[Scheduler] Next cycle in {interval_hours}h")
|
||||
logger.info(f"[Scheduler] Next cycle in {interval_hours}h (at {next_run[:16]} UTC)")
|
||||
|
||||
# Wait for the interval (or until stop is signalled)
|
||||
stop_event.wait(timeout=interval_hours * 3600)
|
||||
|
||||
Reference in New Issue
Block a user