first, directly to set up
Open System Preferences-Energy saver, then click on the "Timed" button, check the second checkbox (the one in front of the sleep), then select Shutdown/reboot/sleep in the Pull-down menu, and set the time on the right.
Second, use Terminal command to set up
For example: Set September 3, 2012 23:15 shutdown: sudo shutdown-h 1209032315 set September 3, 2012 23:15 points restart: sudo shutdown-r 1209032315 set September 3, 2012 23 : 15 minutes Sleep: sudo shutdown-s 1209032315
I believe we all understand, the main body of the command is shutdown,h/r/s to represent shutdown/reboot/Sleep, then add execution Time (YYMMDDHHMM) to the following.
Some fans may still have a problem: what if I want to temporarily cancel a timed shutdown/sleep/reboot? Actually, it is also very simple, or through an example to illustrate. For example, in the terminal we executed the September 3, 2012 23:15 shutdown command, the terminal will display the following:
Note that PID 577 above, this is the current running of the shutdown command of the process number, if you want to cancel shutdown, just want to stop the process of running on it. command is: sudo kill 577