Skip to main content

Scheduler Tasks

The languard-scheduler container owns recurring and queued background work. It shares the backend's database and schema but does not call the web API to perform its normal tasks.

Default schedules​

TaskDefault scheduleConfiguration
Network scanAt startup, then 5 minutes after the previous scan completesScan interval in Settings > Scanning
Failed notification retryEvery 15 minutesNOTIFICATION_RETRY_INTERVAL
Activity cleanupEvery 24 hoursActivity retention in Settings
AdGuard Home syncEvery 5 minutes when enabledIntegration sync interval and retention
Pi-hole syncEvery 5 minutes when enabledIntegration sync interval and retention
Technitium syncEvery 5 minutes when enabledIntegration sync interval, retention, and optional DHCP behavior
LanGuard update checkAt startup, then every 6 hours when enabledUpdate-check interval and notification rule
Speedtest health checkAt startup, then every 5 minutes when enabledIntegration, thresholds, and notification rule
Detailed device port scanOn demand, one queued scan at a timeDevice page and user permissions
Docker inventoryChecked every minute; synchronization follows its saved intervalDocker integration setting

How intervals behave​

Intervals are measured from the end of the previous run, not from fixed clock boundaries. A five-minute network interval and a scan ending at 10:12 results in the next scan starting at approximately 10:17.

The Automatic Scanning dashboard card shows the next network scan using runtime state written by the scheduler. It shows Scanning now during a scheduled scan and Unavailable when the scheduler is stopped or its heartbeat is stale. A manual scan does not replace the scheduled target. If it is still running when that target arrives, the scheduled cycle is skipped and the next interval begins.

The update check works the same way. If the scheduler last checked three hours before you enabled a six-hour interval, the next check can occur about three hours later rather than immediately.

Reloading configuration​

The scheduler reloads network ranges before each cycle and checks the scan interval while it waits. Changing the interval updates the next scheduled time without requiring a container restart. Activity retention, DNS integration configuration, the Docker inventory interval, and the update-check interval are also read from the database during their own loops.

Why there is no cron setup​

LanGuard uses one scheduler process so work can coordinate through the database, react to saved settings, wait until a previous scan completes, and process detailed scan requests serially. External cron entries are unnecessary and can cause overlapping runs.

Operational checks​

Inspect the scheduler logs when scheduled work does not run:

docker logs --tail=200 languard-scanner

After updating, confirm that backend and scheduler images have the same version. A schema mismatch can prevent queued or scheduled work from being processed correctly.