How to Shutdown Windows PC or Laptop Automatically when you Sleep

May 03, 2017 0 Comments A+ a-

How to Shutdown Windows PC or Laptop Automatically when you Sleep


We all like watching television, surfing internet at night. Do you ever slept keeping your television or laptop on for all night. It was my regular habit and I know many such people are there on this planet. But now our television sets are smarter. They can detect any activity and if it is idle for long time, they shut down automatically. But what about our pc or laptop. Do you know that Windows is one of the easiest and versatile operating system on the planet and you don’t have to be a computer expert to overcome this problem. Windows provides a very simple code to auto shutdown your laptop or pc after a set amount of time. Just memorize the following steps and commands.

Method 1: Shut Down Windows 10/8.1/7 PC Automatically After a Specific Time Period Using Windows Command

Step #1: Open RUN Window

The simplest way to open RUN window is to press Windows+R from your keyboard. When you press that combination from your keyboard, you will see the following on your pc/laptop screen.

windows-run-dialog-box

 

The first step is complete. Now you have to put shut down command in your RUN dialogue box.

Step #2: Type SHUTDOWN Command

Learn and memorize this small piece of code. The simplified version of shut down command is as follows:
shutdown -s -t 3600 /f
For windows 8 and newer versions of Windows, you may also type this code. Both of them will work equally.
shutdown /s /t 3600 /f
windows-run-dialog-box-shutdown
The parameters used here with the command tells the actual work to be done.
  • /s or -s tells for shut down.
  • /t or -t tells the time. The number after ‘t‘ specifies number of seconds. Here 3600 means 3600 seconds, i.e., one hour. So the laptop or pc will shut down automatically after 1 hour.
  • /f stands for forced. It will say for forced shutdown so that no program can prevent the shut down.
When you successfully typed the shutdown command and clicked “OK” button or pressed “ENTER“, the code will execute, and you will get a confirmation that your pc or laptop is going to shut down.
windows-run-dialog-box-shutdown-confirm
Now you can easily shut down your windows pc or laptop automatically.

Prevent Windows from Auto-Shutdown

You have already learned how to automatically shutdown your windows pc or laptop when you sleep. But what will happen if you have already set the timer for shutdown but you didn’t sleep. It will be very annoying if you are doing something important task and your laptop shuts down automatically due to that command. As it is forced shutdown, if the shutdown process is initiated, you will be unable to stop the process at that moment. Windows also provides another command to prevent that, but you will have to execute that before shutdown process is initiated, atleast one second earlier. The code to prevent auto shutdown is as follows.


shutdown -a
 
The parameter “-a” says windows to abort any shutdown process that is already set. The process is same as before. You have to open the RUN window and have to type the code there.

windows-run-dialog-box-shutdown-abort

When you have successfully executed this code, your laptop or pc will not shutdown automatically.

Method 2: Turn off Windows Automatically Using Task Scheduler of Your PC

You can create a schedule for shutting down Windows PC at a particular time regularly. For this, you can take help of Windows Task Scheduler option. This option is only available in Windows 7 and the later versions of Windows. Let’s see how to create a task for schedule shut down of Windows PC.
auto-shutdown-windows-trigger
  1. Find Task Scheduler from the Windows search box and open it.
  2. Tap/choose the option Create Basic Task which is available under the Actions section at the right pane of Task Scheduler window.
  3. Give it a name like ‘Auto Shut down Windows’ so that you can identify the task easily in future.
  4. Click Next button and proceed to next screen.
  5. You can choose the frequency of the task from this section. If you want to shut down the Windows PC automatically every day, then you can choose Daily option. Otherwise go for the option that suits you best.
  6. You can set the Windows shut down time at the next recur setting window.
  7. Click on Next button and choose the action “Start a program”.
  8. Click Next and under program and script field type
    C:\Windows\System32\shutdown.exe
  9. In the argument field type /s.
  10. At last, review the setting and click Finish.
Your PC/laptop will shut down at the mentioned time every day.

Method 3: Create A Bat File to Turn Windows PC Automatically

To make the process easier you can create a batch file. When you run the bat file, the PC will turn off at the schedule time.
Open Notepad and type the below code there:
@echo off
 :a
if %time%==01:00:00.00 goto :b
goto :a
 :b
shutdown.exe /s /f /t 60 /c "Good Night. I am shutting down!!!"
Save the file as shutdown.bat in your Windows desktop. Double click the file to run it. You will find a blank screen of command window. Just minimize it and do your work. At the schedule time you will get a message and your PC will shut down automatically. You can change the auto shut down time by changing %time% value. This code will turn off the laptop or PC at 1 a.m.

Method 4: Use ‘PC Auto Shutdown’ Application to Turn off Windows PC Automatically

PC Auto Shutdown” is a Windows application which allows you to shut down your Windows PC at a schedule day, at a specific date, at a particular time. Just set the time at when you want to shut down your PC, select shutdown action and press OK button.

pc auto shutdown software for windows

The application will do the rest for you at the time you mention. However, you can reboot, hibernate, log off your PC using the brilliant utility.
Here is the download link:
http://www.drivermagician.com/autoshutdown/

Method 5: Wise Auto Shutdown Software

Wise Auto Shutdown is a free portable windows application that can schedule the Windows shut down/log off/restart/sleep task at a specified time and date. Also, you can repeat the same task regularly. The software reminds you five minutes before the execution of the task.

auto shutdown application by Wise Auto Shutdown

In this tutorial, I try to cover how to shut down Windows PC or laptop automatically. When you set a particular time at your PC to shut it down forcefully using the above Windows commands, the PC will shut down. This method is very much helpful to the people who work for hours at night and fell asleep while working.