launchd (ref) is the preferred method for scheduling events in OS X, as opposed to using
Here is a method for putting an OS X computer to sleep at a specified time using built in OS X tools without the override alert prompt. Waking the computer up can still be handled via System Preferences → Energy Saver → Schedule.
First create the following shell script in
Then create a
launchd plist file for scheduling a script to be run daily. It would look like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
You would probably want to put this in
/System/Library/LaunchDaemons/ with the filename
org.myschoolname.sleep.plist. Adjust the time and name as needed.
You can load the plist using the command
sudo launchctl load -w /System/Library/LaunchDaemons/org.myschoolname.sleep.plist or reboot the computer and it should be loaded on system startup.
If you are not comfortable with using
launchd files and command line tools then search for the paid OS X app named Lingon which handles the creation of the plist file and loaded it.
Here is a good reference on
pmset, which is the command line tool for managing power setting in OS X.
pmset can be used to set sleep and wake schedules, you'll still get that alert box on scheduled sleep. The
pmset sleepnow command causes the computer to go to sleep immediately without an alert.