# Scheduled Reboots (Due to failure/updates/or just scheduled)

**Project:** Servers | **Board:** Planned | **Votes:** 2
**URL:** https://roadmap.ploi.io/projects/1-server-level-requests/items/1479-scheduled-reboots-due-to-failureupdatesor-just-scheduled

---

**Scheduled & Smart Reboots for Managed Servers**

Summary
Introduce a flexible and intelligent reboot management system within Ploi, allowing users to schedule fixed server restarts or automatically reboot servers when required by system updates.

⸻

Key Features
1. Scheduled Restart (Cron-based)
- Allow users to configure fixed reboot schedules
Support:
- Presets (e.g. daily at 01:00, weekly)
- Custom cron expressions (advanced users)
Show:
- Next scheduled restart
- Last/next execution preview
- Safety confirmation before enabling unattended restarts

2. Auto-Restart When Required
- Automatically reboot servers only when required (e.g. kernel updates)
- Runs within a defined maintenance window
- Prevents unnecessary reboots while ensuring updates are applied

3. Maintenance Window Configuration
- Define preferred reboot window (e.g. Sunday 03:00)
Used by:
- Auto-restart when required
- Future maintenance tasks (extensible)

⸻

UI / UX
- Central “Scheduled Maintenance” section per server
	Toggle-based controls:
- Scheduled Restart (On/Off)
- Auto-Restart When Required (On/Off)
- Clear schedule preview (human-readable + cron)
Warning/acknowledgement for unattended restarts

⸻

Technical Considerations
- Use system-level scheduling (cron / systemd timers)
- Detect reboot requirement (e.g. /var/run/reboot-required)
- Ensure agent awareness (Ploi agent sync / health checks)
- Graceful reboot handling (optional pre-checks in future)

⸻

Value / Benefits
- Improves server stability and security (timely updates)
- Reduces manual maintenance workload
- Prevents downtime during peak hours
- Provides MSP-grade control over infrastructure lifecycle

⸻

Future Enhancements
- Pre-reboot hooks (stop services, notify users)
- Post-reboot health checks & alerts
- Cluster-aware rolling reboots
- Integration with monitoring/alerting
- Global policies (apply to multiple servers)
