> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pilotwatt.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Smart scheduler

> Daily FoxESS schedule from tomorrow's Agile rates and your cheap import window.

Every day at **16:30 UTC** (4:30pm GMT / 5:30pm BST), after Octopus publishes tomorrow's Agile rates, PilotWatt builds and pushes a **tomorrowSchedule** to FoxESS — the full next calendar day on the inverter, not just the remainder of today.

This is \~90 minutes after Octopus typically publishes (\~4pm UK), so the optimiser usually has the full 48 half-hour slots for the next day.

## What it optimises

1. **Export** during the best-rate window(s) above your minimum threshold (default 12p/kWh) — picking the highest-revenue sub-window within eligible runs (capped by battery discharge capacity and a 4-hour max)
2. **Force charge** during your Intelligent Octopus cheap window (default 23:30–05:30 at 7p/kWh)

Scheduled export is skipped when battery SoC is below **30%**.

## Example day

| Time          | Mode         | Why                              |
| ------------- | ------------ | -------------------------------- |
| 00:00 – 05:30 | Force charge | IO cheap window (overnight tail) |
| 05:31 – 16:59 | Self-use     | Solar fills battery              |
| 17:00 – 18:00 | Force export | Peak Agile slot                  |
| 18:01 – 23:29 | Self-use     | Normal operation                 |
| 23:30 – 23:59 | Force charge | Overnight charge starts          |

On low-rate days with no slot above your threshold, PilotWatt may skip export and stay on self-use while still charging overnight.

## Settings

**Settings → Smart scheduler**

| Setting                  | Default                       | Purpose                                               |
| ------------------------ | ----------------------------- | ----------------------------------------------------- |
| Scheduler enabled        | Off                           | Turn on automatic daily push                          |
| Battery capacity (kWh)   | Your pack size (default 10.4) | Discharge window sizing and estimates                 |
| Minimum export rate      | 12p/kWh                       | Don't schedule export below this                      |
| Cheap window start / end | 23:30 / 05:30                 | IO charge period (fallback if IO GraphQL unavailable) |

Check your Octopus app for the actual dispatched IO window — it can vary slightly night to night.

## Verify it worked

After 16:30 UTC:

1. **Planner → Tonight's Plan** in PilotWatt
2. FoxESS app → **Work Mode → Mode Scheduler**

Both should show the schedule PilotWatt pushed.

## Re-optimise

**Planner → Re-optimise now** re-runs the optimiser. If today's export window is still pending and the inverter matches the planned schedule, PilotWatt may **preserve** that plan instead of rebuilding.

## Manual override interaction

If you **Force Export**, **Force Charge**, or **Return to Automatic** from Home, PilotWatt merges a \~30-minute period into today's existing schedule rather than wiping the rest of the day. Scheduled export windows are protected — you'll get a confirmation if an override would cut into one.

If FoxESS rejects a full merged schedule, PilotWatt may fall back to a short override that temporarily replaces the rest of today's inverter plan. Drift repair later restores the DB plan when the inverter is out of sync (gated to at most one full check per user per 15 minutes on Home load).
