Skip to main content
Stub — see Smart scheduler for user-facing summary.
Trigger: Vercel cron 15 15 * * * UTC → /api/cron/scheduler (plus manual run from Settings). Steps (simplified):
  1. Load tomorrow’s Agile export rates for the user’s GSP
  2. Find best export window above minExportRateP
  3. Insert Force Charge periods for IO cheap window (start + overnight tail)
  4. Fill remaining periods with Self-use
  5. Push tomorrowSchedule to FoxESS (full next calendar day)
  6. Log run + estimates to Neon (scheduler_log)
Source of truth: lib/domain/scheduler.ts, lib/providers/foxess-scheduler.ts.