Page 1 of 1

Project Report: Automated Reboot Manager for Group-Based Reboots

Posted: Thu May 15, 2025 2:36 pm
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.