Sometimes, you wish you could automatically set your Mac to shut down, sleep or restart. A time-consuming process like installing updates will require you to wake up at dead of night and log off your device. Like always, Apple offers a Mac shutdown timer to automate the process.

The Mac App Store has a number of options, including Timer Boom and Shutdown Timer. In addition, you can shut down via the Terminal. Apple boasts features that allow you to predetermine shutdown at a specific time or within intervals or hours elapsed.
People Also Read:Getting the Best Duplicate Files Cleaner for MacChrome Running Slow on Mac? Here is How to Fix!
Part 1. Mac Shutdown Timer: How to Make Mac Automatically Shut Down
Use Terminal Command
Invoke Terminal to throw together a more adaptable shutdown timer. The shutdown command allows you to screech your Mac into a halt in Terminal.
You can tweak this Mac shutdown timer to make the best out of the feature, following the steps below:
- -h will terminate the machine at a specified time.
- -r reboots the system
- -s will automatically make your Mac sleep rather than shutdown
You may want to broaden your shutdown timer possibilities but the above options give you everything you need. If you recall this shutdown path, you can just launch Terminal and type the command to craft a shutdown timer. If you wish to bring your Mac to a standstill in 15 minutes-then enter the following command:
sudo shutdown –h +15
This command will launch the shutdown process after fifteen minutes; simply substitute the “15” in the foregoing command with any number of minutes. This command may prompt you to enter the administrator password before executing the instructions. For a restart or sleep timer, the commands look like this:
sudo shutdown –r +15sudo shutdown –s +15
Once the command starts running, the Terminal will portray the time of the next shutdown. Closing the window or pressing Control + C in the page revokes the shutdown command.
The shutdown timer created gives you the specific time and date when the shutdown/restart/sleep process will apply. It will give you a process ID called pid in the form of three to four digit number. You can also cancel a preset timer, jot down its pid and type the following command in the terminal, viz. sudo kill (pid number).
Tip: Give your Mac performance boost like doses of salt with PowerMyMac to steer clear of issues associated with your shutdown. It’s a multi-tool featuring a performance monitor, memory retriever, optimizer, and smart cleanup technology. Just like a shutdown timer, this Mac maintenance tool will give your Mac a regular cleanup to free up gigabytes of purgeable storage space, optimize performance and promote rapid memory retrieval. PowerMyMac isolates large or old files, iTunes junk, photo clutter, Mail attachments, and unneeded content. Try it to give your machine a new lease of life in a single click.
Part 2. Generate A Shutdown Timer Desktop Shortcut
If you have a frequent shutdown timer, having a desktop shortcut for it makes life easier.
- Launch TextEdit and click on New Document. This thrusts a blank text document into view. If the document is larded with coding jargon, press
command + shift + Tto access plaintext. - On the top of the text window, enter the following:
#!/bin/bash. This signals the operating system to execute the command with Bash. - Hold down return twice, and type the
shutdown timercommand in the third line likesudo shutdown –h + 10. - Save the file with a simple name. Before hitting Save, ensure you uncheck the box near If no extension is provided, use .”txt. Hit Save.
Making the File Executable
- Launch Terminal and alter directory to Desktop by entering
cd ~/Desktopand hit enter. Next, punch outchmod 774 shutdownsand hit enter. - Double-click the shutdown desktop shortcut to open Terminal, prompting you to type your user password. After that, the timer will start.
- You may want to substitute the default icon of the executable file, click to identify it and hold down
Command + l. This launches the shortcut’s info page. Open the file you wish to apply in Preview and hold downCommand + Ato highlight all andCommand + C, which copies it. Go to the info window of the shutdown timer, click on the logo in the upper left corner to select it, and then latch onCommand + Vto paste the file.
