If you are used to WINDOWS system settings through regular shutdown, restart, sleep and new to MAC. Then this tutorial is going to help you to set scheduled shutdown, restart, sleep on MAC.
Directly set the timer to shutdown, restart & sleep on MAC
On MAC OS, Open the "
System Preferences"
then "
Energy Saver" and click on the "
Schedule" button. Check the second box (front of sleep), and then select
Shut Down or
Restart or
Sleep in the drop-down menu. Set the time on the right and click on
OK. You are done.
Use MAC terminal to schedule timer to shutdown, restart, sleep
If you want to use terminal commands to schedule timer on MAC. You can do that easily by simple commands. Follow the Example below.
Example: Suppose you have to set timer at 23:15 on September 3, 2012 to shutdown MAC then you must enter this code in the terminal window: sudo shutdown -h 1209032315
Now to Restart at 23:15 on March 3, 2012 , the code goes like this : sudo shutdown -r 1203032315
And to set Sleep timer on January 3, 2012 at 23 : 15 ,the code for sleep is : sudo shutdown -s 1209032315
It is pretty understandable code. The "sudo shutdown" must added in all the commands. -h / -r / -s is used for Shutdown, Restart and sleep respectively. the last number is the date and time format arranged as YYMMDDHHmm , Where Y is year code - 12 for 2012. M is month code - 03 for March. D is the date and H and m are the Hour and minute respectively. See the image below.
There are other variation possible with the code above. Like you can use sudo shutdown -r now code to reboot MAC immediately. Or you can use sudo shutdown -r +5 to restart MAC after five minutes.
How to stop the shutdown timer once set on MAC
To stop the shut down timer you can use the command as shown in the image below. Once you set the timer you will get a PID ID as shown in the image above. The PID is 577 in the above example image, which means the shutdown process is running the shutdown command on PID 577. Now to stop the shutdown timer on MAC just kill the PID process by the unique ID by following command: sudo kill 577
So this tutorial is over. If I missed something, just raise your question or suggestion in the comment section below.
ADS HERE !!!