banner



How To Set Sleep Timer On Macbook

If you e'er felt like shutting down your Mac later a time-consuming process has finished, such equally downloading and installing updates or exporting a video, what you need is a shutdown timer.

Some Mac App Store applications already perform these functions, such equally Timer Nail and the aptly named Shutdown Timer. However, y'all don't need any dedicated software for this purpose. All you need is this simple trick.

Read more:If you're looking for a shutdown timer on Windows, there's a quick tip for that, too.

A built-in power schedule

NetherFree energy Saver settings, MacOS has a built-in wake and sleep schedule.

To enable information technology and create a schedule, become toSystem Preferences > Free energy Saver and clickSchedule… in the window'southward lower correct corner. There you can ready a fourth dimension and day (weekends or weekdays, too) that the Mac will start up or wake, besides every bit a time and day(s) when it volition restart, close down or sleep.

As helpful as the schedule feature is, it'southward limited in how it can piece of work. Still, y'all could use it to shut down your computer at a specific fourth dimension. Merely select a time for the slumber or shutdown to happen afterwards the procedure is expected to finish.

Make your own shutdown timer

If you want a more adjustable shutdown timer, yous only need to know a few last commands.

Theshutdown command will, as expected, shut down your Mac when used in Last. But there are some essential options that you will as well want to use to brand this shutdown timer meet your needs.

  • -h volition halt the system at a specified fourth dimension.
  • -r will reboot instead of shutdown.
  • -s will put the Mac to sleep instead of shutdown.

You tin can read more most other options in Apple'south shutdown documentation, but for a shutdown timer, -h, -r and -s are likely all you will need to know. This is a shutdown timer command for fifteen minutes with a PID of 842.

If you lot remember this shutdown command, you tin merely open Concluding and enter the command to create a shutdown timer. Some case shutdown timer commands would wait like this:

  • A fifteen-minute shutdown timer:sudo shutdown -h +15
  • A 30-minute restart timer:sudo shutdown -r +xxx
  • A 1-hour sleep timer:sudo shutdown -s +sixty

When you enter ane of these commands, you will need to enter the password for the user account and press render. The shutdown timer will then be created, giving yous the verbal time and date that the shutdown/restart/sleep process volition occur. It will also requite you the process ID, also known as aPID, which is a three- to a four-digit number.

If you lot wish to cancel a shutdown timer, take note of its PID and enter this command in Terminal:sudo kill [pid number].

Create a shutdown timer desktop shortcut

If you often use the same shutdown timer, you may desire to create a desktop shortcut for the timer.

To do this, open TextEdit and clickNew Document. This opens a bare text document. If the document is not in plain text, presscommand + shift + T to switch to apparently text.

shutdown-timer-mac-script
A partially complete script for a shutdown timer.

On the very elevation line of the text file, type#!/bin/bash. This tells the operating system that the command should be executed using Bash.

Press return twice, and on the third line, enter your shutdown timer command, such every bitsudo shutdown -h +15. Salvage the file to Desktop and give information technology a simple proper noun, similarshutdown. Earlier clickingSave, make sure to uncheck the box abreastIf no extension is provided, use ".txt". ClickSave.

Finally, nosotros demand to make the file executable. Open concluding and alter directory to Desktop by typingcd /Users/[username]/Desktop and press enter. Next, typechmod 774 shutdown and press enter.

Now, if you double-click the shutdown shortcut on your desktop, Final will open, prompting yous to enter your user password. Once entered, the timer will begin.

If you want to supplant the default icon of an executable file, click to highlight the icon and presscontrol + I. This opens the info page for the shortcut. Open the image you desire to use in Preview and printingcommand + A to select all andcontrol + C to copy.

Lastly, in the info window for the shutdown timer, click the logo in the summit left corner to highlight information technology, and then printingCommand + 5 to paste the epitome.

Source: https://digitalgyan.org/how-to-put-a-sleep-timer-shortcut-on-your-mac-desktop/

0 Response to "How To Set Sleep Timer On Macbook"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel