Project Report: Automated Reboot Manager for Group-Based Reboots

One of the biggest operational headaches is managing system reboots across multiple client environments without disrupting productivity. That’s where our latest project steps in—a ConnectWise Automate plugin designed to simplify reboot management while automating scheduling, enforcing dependencies, and reducing unnecessary downtime.
Post Reply
User avatar
Cubert
Posts: 2694
Joined: Tue Dec 29, 2015 7:57 pm
9
Contact:

Project Report: Automated Reboot Manager for Group-Based Reboots

Post by Cubert »

Overview

This Automated Reboot Manager is designed for managing scheduled system reboots in IT environments while respecting **policy-based execution, group dependencies, last-contact validation, and incremental delays**. The goal is to ensure efficient and orderly reboots across multiple systems without disrupting critical operations.

---

Objectives

🔹 Identify and process computers **pending a reboot** (`Flags & 1024 = 1`).
🔹 Verify **assigned reboot policies** at the **computer, location, or client level**.
🔹 Validate a machine’s **LastContact timestamp** to exclude offline computers.
🔹 Handle **reboot group dependencies**, ensuring an orderly execution process.
🔹 Apply **incremental reboot delays** for group-based dependencies.
🔹 Determine each machine’s **OS type** to send the correct reboot command.
🔹 Log all reboot activity for **tracking, troubleshooting, and audits**.

---

Implementation Details
📌 Policy-Based Scheduling

Computers follow defined scheduling rules:

✅ Daily Reboots: Execute within **6 minutes** of the scheduled time.
✅ Weekly Reboots: Execute only if today matches the assigned weekday.
✅ Monthly Reboots: Executes on the correct day of the month. If the scheduled date exceeds the number of days in a given month, the last day of the month is used.

📌 Group Dependencies & Execution Order
Computers within reboot groups follow a structured process:
🔹 Dependency Check → If `dependency = 1`, all group members are retrieved.
🔹 Reboot Order Sorting → Members are sorted by **reboot_order** to ensure sequential execution.
🔹 Incremental Delay Application → Each computer gets an increasing delay (`0s`, `60s`, `120s`, etc.).

📌 OS-Specific Reboot Commands

Each system type uses the appropriate command:
🔹 Windows → `shutdown /r /t X` _(Seconds-based delay)_
🔹 Linux/macOS → `shutdown -r +X` _(Minutes-based delay)_

---

Logging & Failure Handling

✅ Each reboot action is logged with timestamp, policy details, and execution status.
✅ Skipped machines due to inactivity are separately logged for troubleshooting.
✅ Future enhancement: A retry mechanism for offline machines will allow missed reboots to be rescheduled automatically.

---

Achievements

✔️ Fully automated reboot scheduling with policy enforcement
✔️ Group reboot execution with ordered dependencies
✔️ Dynamic OS-based reboot command selection
✔️ Incremental delay system for dependent machines
✔️ Comprehensive logging for tracking execution status

Future Enhancements

🔹 Retry Logic for Offline Machines → Attempt reboots once they check in again.
🔹 Centralized Reporting → Generate structured reports on reboot history.
🔹 Enhanced Failure Handling → Detect failures and trigger corrective actions.

---

The Automated Reboot Managerprovides an efficient, structured, and scalable solution for scheduling reboots without disrupting system operations. By integrating policy enforcement, dependency tracking, and OS-based execution, this tool enhances IT workflow efficiency and reliability.

Post Reply

Return to “Reboot Manager For ConnectWise Automate”