Script to schedule restart on Mac
Periodic rebooting of Mac is a good practice to ensure the devices work in top conditions. It regularly clears apps’ memory, fixes peripheral and hardware issues, improves device performance, and much more. However, administrators cannot completely rely on the end-users to perform the restart action occasionally. Most users prefer to keep their devices running all the time, making them ready for action whenever they need to. In such circumstances, IT can take advantage of the custom scripts in Hexnode to schedule the periodic restart of their Macs remotely.
Scripting language – Bash
File extension – .sh
Schedule restart on macOS devices
sudo shutdown -r hhmm
hhmm with the hour and minute (in 24-hour notation) at which you need to schedule the restart of your managed devices. Once the script is executed, the devices will be rebooted at the specified time.