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_secondsin 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
| Method | Route | Description | Auth |
|---|---|---|---|
| POST | /api/v1/scheduler/pause | Suspend automatic pings | Admin |
| POST | /api/v1/scheduler/resume | Resume suspended pings | Admin |
| POST | /api/v1/scheduler/trigger | Immediately run a full ping pass | Admin |