Pcs Often Go Into Sleep Mode When Left Unused For A While. If, For Any Reason, You Prefer Your System To Shut Down After A Period Of Inactivity, Do Not Miss This Article.
The various operating systems are configured by default to reduce system resource consumption after a few minutes of inactivity or put your computer to sleep if set up.
Suppose you prefer your computer to shut down automatically when you are not using it for a long time. In that case, you can use several methods to schedule the system to shut down automatically.
This article will describe some of these Windows, Mac, and Linux operating systems methods.
Automatic shutdown of the computer in Windows
There are three different ways to turn off the computer automatically in Windows, all three of which will be explained below. You can use any of these three methods to turn off Windows automatically.
Schedule automatic shutdown of Windows with Task Scheduler
Task Scheduler is a programming tool in the Windows operating system that can create a scheduled task to turn off the PC at a specific time of day. To do this, follow these steps:
- Press the Win key to open the Windows search bar.
- Type Task Scheduler and click on the program icon in the search results to open it.
- In the Task Scheduler window, click on Action and select Create Basic Task.
- In the Basic Task window, type a name for the task you want to create (turn off the computer). For example, type Shutdown as the name. You can also provide a job description in the Description section. Click Next.
- You must now select the trigger time. This Time can be set as Daily, Weekly (Monthly), Monthly (Monthly), and Only Once (One Time).
- In this example, we selected Daily to turn off the computer at a specific time of day. After selecting, click Next.
- Next, set the start date and Time for repeated shutdowns and click Next.
- In the Action tab, select Start a program and click Next.
- In the Program / Script field, type shutdown.exe and click Next.
- Check the changes and click Finish to create a new task and add it to the Windows application.
The Task Scheduler executes the shutdown action every day at your specified Time and shuts down your computer.
Schedule Windows shutdown with CMD or Run
While the Task Scheduler is a great tool, it may seem not very easy to those who have not used it. So you can also use the shutdown command on the Windows command line to turn off Windows automatically.
The shutdown command lets you automatically set the timer to turn off your Windows PC. To schedule Windows shutdown with CMD:
- Press Win + X to open the WinX menu.
- Click on Windows Terminal (Admin) to open the following terminal.
- In the Windows Terminal window, type the following command and press Enter:
Shutdown /s -t N seconds
- In the above command, replace N seconds with the number of seconds. For example, if you want to set a timer for 5 minutes (300 seconds), the complete command would be:
Shutdown /s -t 300
- If you want to do a scheduled restart, type the following command, replace N seconds with the number of seconds to set a timer to restart, and press Enter.
Shutdown -r -t N seconds
- Type the following command and press Enter to cancel turning off or restarting the timer. You will then see a logoff is canceled message indicating that the shutdown has been canceled.
Shutdown -a
The exciting thing about this method is that you can also type and execute the said commands using Run or the same Windows executable with the Win + R key combination. Therefore, using this method can be another way to turn off the system automatically.
Automatically shut down Windows by creating desktop shortcuts
You can create a desktop shortcut with a timer to turn off your computer automatically. Creating shortcuts is helpful if you do not want to run Cmd every Time to set the timer. Follow the steps below to create a desktop timer blackout:
- Right-click on your Windows desktop and select New> Shortcut.
- Type the following command in the Type the location of item field, in which 300 seconds (5 minutes) indicates the number of timer seconds. You can change the seconds according to your needs.
Shutdown -s -t 300
- Click Next. Then type a name for your shortcut. Type ShutDownTimer, for example.
- Click the Finish button to add a shortcut to the desktop. To change the shortcut icon, you can right-click on the ShutDownTimer desktop shortcut, select Properties, and click the Change icon in the shortcut tab.
- Choose the icon that is the best sign for your blackout timer. In this example, we selected the power icon.
- Click OK to select the option. Then click Apply and OK to save the changes.
To start the shutdown timer, you can double-click on the ShutDownTimer shortcut and use the shutdown -a command in CMD to cancel this Schedule.
Automatically turn off PC on Mac.
A section called Energy Saver in Mac operating system settings is usually used to control screen shutdown when not in use, hard disk slip mode, system wake-up to access the network, and system shutdown after a power outage. You can also use the Schedule option to schedule the device to turn on or off in this section.
To access Energy Saver on Mac:
- Click the Apple logo in the menu bar and select System Preferences.
- Click on Energy Saver.
- Then click on Schedule.
- Check the box next to the second drop-down menu. This menu determines whether your Mac is turned off, restarted, or in sleep mode.
- Select Shut Down from the drop-down menu.
- Enter the Time and day. For example, if you want the computer to shut down every night at 11:30 pm, you must select Every Day from the drop-down menu and enter 11:30 in the at box.
- Click OK to turn it off automatically at the specified Time when your system is on.
Automatic shutdown of the computer in Linux
You must use a terminal to turn off Linux distributions automatically. In Ubuntu, the system is set to shut down as planned using the shutdown command, depending on the value you enter after P-.
Here are the steps to schedule a shutdown in Ubuntu using the shutdown command :
- Press Alt + Ctrl + T to open a terminal to type the command to shut down the system.
$ sudo shutdown -P +30
- In the example above, the 30+ parameter means the system shuts down after 30 minutes, so change the Time to 30 minutes instead of 30.
You can also enter the exact Time the system turned off instead of setting the timer; The following command can use to do this:
$ sudo shutdown -P 14:00
- This command means the system shuts down at 2 pm, so you must specify the exact Time of shutdown in HH: MM format after P-to shut down the system at the Time and Time specified by you. You can also replace P- with h-.
- If you want to cancel the scheduled shutdown, use the c -option after the shutdown command.
sudo shutdown -c
***
We hope you find this helpful tutorial. If you have any questions about automatically shutting down your computer on Windows, Mac, and Linux, please let us and users know.