Scheduler

How the APScheduler-based ping loop works.

PyPing uses APScheduler (AsyncIO backend) to run ping passes. The scheduler starts automatically on app launch if scheduler_enabled is true.

Behavior

  • Each pass pings all active devices concurrently using async ICMP.
  • Results are written to the ping log immediately.
  • If a device's status changes (online → offline or vice versa), the alert pipeline fires.
  • Changing ping_interval_seconds in Settings reschedules the job in-place — no restart needed.
  • If the scheduler is paused via Settings, no automatic pings occur until resumed. Manual pings via the Ping Now button still work.

Scheduler API

MethodRouteDescriptionAuth
POST/api/v1/scheduler/pauseSuspend automatic pingsAdmin
POST/api/v1/scheduler/resumeResume suspended pingsAdmin
POST/api/v1/scheduler/triggerImmediately run a full ping passAdmin