How to turn off your PC after a certain time. Computer shutdown shortcut

Automatically shutting down the computer after a certain period of time is a feature of the Windows operating system that is not obvious to users. Moreover, it is implemented in software from Microsoft, but not everyone knows about it. You can also set a timer to turn off your computer in Windows 10 or earlier versions of operating systems using third-party programs that have a more user-friendly interface, but they must be downloaded separately. We suggest looking at a way to set a scheduled shutdown of your computer after a certain period of time using the command line.

How to set a timer to shut down your Windows 10 computer using the command line?

Attention: The method of automatically turning off the computer after a certain amount of time, described below, works not only on the Windows 10 operating system, but also in earlier versions - Windows 8, Windows 7, Windows XP.

Microsoft, when developing the Windows operating system, assumed that users may need to turn off their computer after a few hours or minutes. At the same time, even an experienced Windows user does not always know that the operating system has a built-in timer to turn off the computer. This is due to the fact that it does not have a graphical interface, shortcuts, and can only be accessed through the command line. To set a computer shutdown timer using standard Windows tools:


The Windows command line also supports a number of other commands related to the shutdown function. We suggest you familiarize yourself with them, since a combination of commands allows you to achieve the desired results in automating the process of turning off your computer at a certain time or after a specified period.

Windows Command Line Options

When using the shutdown command to shut down the computer, you should be aware of the parameters entered after it, which are specified by letter keys. The key can be written after the dash symbol (examples: -a, -p, -h) or slash (examples: /a, /p, /h). It is important to remember that all letters entered into the command line along with the shutdown function must be written in Latin characters (that is, in English).

Windows command line options for the shutdown command:


Please note: you can read for yourself the full list of parameters that are expected to be used with the shutdown command. To do this, just enter the following combination of functions “shutdown /?” on the MS DOS command line. To do this, launch the standard Windows command line (Windows + R key combination), enter the cmd.exe command in it, and then in the MS DOS command line window that opens, write “shutdown /?”.

How to create a convenient timer to shut down your computer on Windows 10 after a certain time?

If you regularly have to use the function of turning off the computer after an hour, two, or any other period of time, then the process of starting the countdown timer until shutdown can be automated as much as possible. Instead of regularly remembering the values ​​of functions for the command line, you can write them down once in a separate shortcut, by double-clicking on which the computer will begin counting down to the shutdown time.

Creating a computer shutdown timer shortcut on Windows 10 is simple:


By double-clicking with the left mouse button on the created shortcut, you can easily run the command that is written in it. Thus, you can automate the process of setting a timer to turn off the computer after a certain time - 10 minutes, an hour, 5 hours or more. These shortcuts are often created by system administrators for employees who need to leave their computers turned on at the end of their shift to process certain tasks.

1. Using the Run menu

To activate the shutdown timer, the only command you need is shutdown -s -t xxx . Instead of three X's, you need to enter the time in seconds after which the shutdown will occur. For example, if you enter shutdown -s -t 3600 , the system will shut down after one hour.

Press the Win + R keys (open), enter the command in the field and click Enter or OK.

If you want to cancel the shutdown, press Win + R again, enter shutdown -a and click OK.

2. Using the “Task Scheduler”

This way you will not start the timer in the literal sense: the computer will not turn off after a certain period of time, but exactly at the specified time.

First, open the Task Scheduler menu. To do this, press Win + R, enter the command taskschd.msc in the field and press Enter.

Now schedule the shutdown. Click “Create a simple task” in the right panel, and then specify its parameters in the wizard window: any name, repetition mode, execution date and time. Select “Run program” as the task action. In the Program or Script field, enter shutdown and on the adjacent line specify the -s argument. After this, click “Done”.

If you want to cancel the shutdown, open Task Scheduler again. Then click “Task Scheduler Library” in the left panel, select the created task in the list that appears and click “Disable” in the right panel.

3. Using third-party software

If you don’t want to remember commands and delve into , use third-party programs. For example, the PC Sleep utility can turn off the computer using a timer or exactly at a specified time. It's free and very simple.

To activate the shutdown timer in PC Sleep, launch the program and select Shutdown from the Function Select menu. Then check Shutdown in and specify the time after which the system should shut down. After that, click Start to start the countdown.

To cancel the shutdown, just expand the program window and click on the Stop button.

PC Sleep can also be configured to turn off your computer at a specific time. To do this, instead of Shutdown in, select Shutdown at. In addition, you can schedule not only shutdown, but also other actions: reboot, hibernate, hibernate, and log off. These options are also available in the Function Select list.

If you want the computer to fall asleep after the end of the movies, you can also read about the program.

How to set your macOS computer's shutdown timer

1. Using “Terminal”

The command sudo shutdown -h +xx shuts down the Mac after a specified amount of time. Instead of X's, enter the number of minutes. For example, typing sudo shutdown -h +60 will cause the shutdown timer to expire after one hour.

To enter a command, open the Terminal application, manually type or copy the characters above and press Enter. If prompted, enter administrator. After this, the countdown to shutdown starts. To cancel it, open Terminal again, type sudo killall shutdown and press Enter.

2. Using the "Energy Saving" menu

In this section, you can schedule the computer to turn off at a specified time. Pull down the Apple menu and click System Preferences → Energy Saver → Schedule. In the window that opens, select the “Turn off” option, specify the day of the week and time.

When the time is up, a shutdown warning will appear on the screen. If you do not use the cancel button, the system will turn off after 10 minutes.

Hello dear RuNet users, today we will talk to you about how to configure automatic shutdown of your computer. In this article I will tell you how to turn off your computer using standard Windows commands or using a special program.

Automatic shutdown of the computer is one of the useful functions for every user. There are many situations when it will definitely come in handy.

For example, you need to download a large file in the evening and you realize that it is already late and you want to sleep, but the file will download for a very long time. You will want to download something, but it’s not at all convenient to urgently leave for a couple of hours.

You can give many more examples when you need to turn off the computer after a certain period of time, but for some reason you will not be able to do this. That's what this function is for.

shutdown command

To launch the command line, press the key combination “Win” + “R”, enter “cmd” and click “OK”.

Or “Start - Accessories - Command Prompt”.

A command prompt window will open. To see what parameters there are for the “shutdown” command, enter “shutdown /?” and press “Enter”.

To work with this command we need to know 3 parameters:

  • s– shutdown the computer;
  • t– time after which the work will be completed;
  • a– canceling system shutdown.

Please note that time is measured in seconds!

To turn off the computer after 1 hour, enter the command with the parameters “ shutdown -s -t 3600" and press "Enter". A window will appear in which you will see a countdown when the computer will automatically turn off.

If you are a Windows 7 user, then no windows will appear. Windows will inform you through the system tray.

If you need to deactivate the time countdown, then just enter “shutdown –a” in the command line and press “Enter”. After pressing “Enter”, the “System Shutdown” window will close and the countdown for turning off the computer will be deactivated.

Program to automatically shut down your computer

There are many programs with different settings in order to automatically shut down the computer. But I will give an example of a program that will be intuitively understandable to the user.

This program is called OFFTimer, you can download it from the blog. It does not need to be installed; it works without installation.

In the right part of the window, select the time to turn off the computer and click on the “Enable timer” button. To ensure that the program does not disturb you, minimize it to tray by clicking on the “Collapse” button.

If you change your mind about automatically turning off the computer, then click on the “Enable timer” button again.

See you soon!

There are situations when we need to leave our computer turned on for a long time. This may be due to the PC operating at night, when some large files are downloaded, or when there is a long installation of operating system updates - the fact is that it becomes necessary to automatically turn off the computer without direct user intervention. In this material, I will tell you how to turn off your computer after a certain time, and also introduce the reader to tools that can help us with the planned shutdown of our PC using a timer.

Turn off the computer automatically at a specified time

How to turn off your computer after a certain time using Windows tools

If you need to turn off your computer using a timer, the simplest and most convenient solution is to use the tools built into the Windows OS. A special team will serve us with such tools. shutdown, as well as a task scheduler built into the system.

How to use the Shutdown command

To use this command, press the Win+R key combination, and in the line that appears, enter:

shutdown -s -t 3600 /f

  • s– completion of work;
  • t– indicates the time in seconds after which our PC will be turned off. That is, 3600 is 60 minutes (1 hour). Instead of this number, you can enter your own, after first calculating how long the time you need will take in seconds;
  • f- from English “forced” - forcibly. Tells the system to forcefully shut down all active applications, meaning no program can prevent your PC from shutting down.

After you click on “Ok”, you will receive a system notification that your computer will shut down after a specified time. If you suddenly change your mind, then press Win+R again and in the line that appears, type:

and this function will be deactivated.

How to use the task scheduler

Using this scheduler, you no longer need to think about how to turn off the computer after a certain time, the program will do everything for you thanks to the schedule you created. Please note that this feature exists in Windows operating systems starting from version 7.

So do this:

  • Click on the "Start" button;
  • Enter taskschd.msc in the search bar and click OK. The task scheduler window will open in front of you;
  • Click on "Action" in the top left;
  • Select the “Create Basic Task” option;
  • In the window that appears, enter the appropriate name, for example, “Automatic shutdown of Windows” and click on “Next” at the bottom;
  • Next, you will need to select the shutdown frequency. If you want to do this every day, for example, at 3 am, then select “Daily”, otherwise select another option and click on “Next”;
  • In the next window, determine the shutdown time and click on “Next”;
  • In the “Action” option, select “Run the program” and click “Next” again.
  • In the line under the inscription “Program and script” we write:

C:\Windows\System32\shutdown.exe

In the argument field we type:

How to use a bat file to shut down your PC automatically at a given time

An effective answer to the question of how to turn off a PC after a certain time is to use a bat file. When you click on such a file, your computer will shut down after the required time.

Open notepad and enter:

if %time%==01:00:00.00 goto:b

shutdown.exe /s /f /t 60 /c “Good night, your computer is shutting down”

  • Save this file called shutdown.bat (make sure it is shutdown.bat and not shutdown.bat.txt) on your desktop.
  • If necessary, activate it by clicking on it.
  • You'll see a blank Command Prompt screen, then just minimize it and continue with your business.
  • At the right time (in this text it is one in the morning) you will see a message about turning off the computer and your PC will turn off.
  • You can change the shutdown time by specifying other numbers instead of “01:00:00.00”.

We turn off the computer at a time determined by us using programs

In the question of how to turn off the system after 10 minutes or after an hour, third-party software applications that need to be installed on your computer can also help. These are products such as PC Auto Shutdown, Wise Auto Shutdown Software and a number of others.

PC Auto Shutdown - shutdown the PC using a timer

This PC Auto Shutdown application for Windows OS will allow you to shut down your computer after the desired time. To take advantage of its functionality, do the following.

To ensure long-term uninterrupted operation of any computer, be it a home desktop PC or laptop, it is necessary to shut it down correctly. Many novice users neglect this point, not knowing or forgetting that incorrect actions at this stage can lead to the loss of working information. And over time, it threatens to require reinstalling the operating system. Not to mention the hardware failure of your PC. This happens quite rarely, but such a risk cannot be completely eliminated.

The shutdown procedure is very simple and can be done in several ways. Let's look into the details.


Do I need to turn off my computer?

You may think: why doesn’t someone turn it off? Yes, and there may be several reasons:

  • the computer is sent to sleep or hibernation mode rather than turned off;
  • the computer is simply not turned off so as not to waste time turning it on;
  • The computer is not turned off at night so that movies or other files can be downloaded at night.

However, there are plenty of objective reasons for switching off. Below are just a few of them:

  • A working modern computer is a rather “gluttonous” device in terms of energy consumption. Therefore, its aimless operation leads to a significant increase in the monthly electricity bill.
  • The slight noise of the coolers of a working system unit, as well as the burning indicators of the system blog at night can interfere with restful sleep (if the computer is in the bedroom). Therefore, it is better not to download large files (torrents, movies) at night.
  • It is undesirable to leave electrical appliances turned on in a house, apartment or office when no one is there.
  • Long-term continuous operation of the computer reduces the service life of the equipment.
  • All components of the system unit located in it are installed only with the power off. These are RAM modules, sound cards, processor, most hard drives, etc. We understood the detailed structure of the system unit. Therefore, if you need to install an additional module in the system unit, the computer will need to be turned off.

Forced shutdown of the computer

Constantly using the methods described below to turn off the computer is extremely contraindicated for the “health” of the computer. However, many novice users, due to ignorance of the correct ways to handle computer equipment, abuse this method of turning off the computer, and then wonder why their computer does not start.

Unplug the cord from the outlet... Caution!!!

The usual action of unplugging an electrical appliance from the socket is not applicable to a computer. No, of course, you can experiment...

But I can’t vouch for the continued normal functioning of the device!

The fact is that during operation, all the necessary data from operating system programs (you can find out what an operating system is and why it is needed at all) and documents are stored in the computer’s RAM. The hard drive is primarily used for persistent storage, and the correct steps must be taken to write data to it when it is turned off.

A sudden shutdown “from the socket” is an emergency option for stopping the computer, in which system files may be damaged, which will not allow the computer to start the next time.

Imagine that you are thinking about an important task and suddenly fall asleep! About the same effect will happen with a computer.

Similar consequences can occur if the uninterruptible power supply suddenly turns off. If you are not yet “familiar” with this life-saving device, then let’s briefly understand its purpose.

An uninterruptible power supply (aka UPS) can provide continuous power to your computer in the event of a sudden loss of electrical current in the network. Usually, it is not intended for long-term work, but only allows you to correctly save all open documents, close programs and turn off the computer within a few minutes. All working data will not be lost.

By the way, computer literacy tests often include the following question: “When you turn off the computer, all information is erased in...”

Answer: in RAM. Everything is saved on the hard drive.

Forcing the computer to shut down using the power button

You can turn off a frozen computer (which does not respond to keyboard or mouse presses) by pressing the power button (also known as the power button) on the system unit and holding it down. Shutdown will occur after approximately 3-4 seconds of holding the button pressed.

It is also undesirable to abuse this method, since this shutdown option is an emergency and can damage system files and lead to the loss of information important to you.

I use it only when the computer is really hopelessly frozen and does not respond to any actions for 15-20 minutes.

Therefore, I once again draw your attention!

Turning off the computer by unplugging the power cord, pulling the power cord, or uninterruptible power supply (UPS) button without shutting down the operating system correctly will result in the loss of all unsaved data and, over time, the operating system will no longer function normally.

Modern operating systems will warn you about open programs before shutting down your computer.

Properly shutting down your computer

Preparation before shutdown

To ensure the safety of open documents and files that you directly worked with, before turning off the computer, you must perform a number of actions:

  • save the results of your work in open programs;
  • remove the disk from the drive, if it is there;
  • close running applications/programs;
  • give a command to turn off the computer using one of the methods that we will discuss below.

How to turn off your computer in Windows 7 via the Start menu.

Click on the button. It's located in the Start menu:

If there are open programs and unsaved documents, after clicking the button, the system will issue a warning asking you to close the programs.

If unsaved documents are not important to you, then you can speed up the shutdown process by clicking on the “Force shutdown” button.

If the documents are important, click the “Cancel” button, save the documents and close the programs and again click on “Shut down” in the “Start” menu

Next, wait until the system unit turns off (the screen will go dark, the system unit will stop buzzing, and the system unit’s power indicator will go out). After which you can turn off the UPS (uninterruptible power supply), if available, or the power strip key.
By the way, to protect your computer, another useful acquisition can be a surge protector (), just don’t confuse it with a simple extension cord!

How to turn off your computer in Windows 8 via the Start menu

To turn off your computer in Windows 8, just click on the start button (usually in the lower left corner of the Desktop). And then click on the computer shutdown icon in the upper right corner of the window.

From the menu that opens, select “Shut down.”

We wait for the system unit to turn off and turn off the power by unplugging it from the outlet or using the surge protector button or on the UPS.

Alternative options

Method 1 - start shutdown by briefly pressing the shutdown button

You can turn off your desktop computer by briefly pressing the power button on the system unit. Further actions in the case of open programs are similar to the steps described above.

If there are none, the computer will turn off automatically.

A short press on the computer's power button will begin the shutdown process (equivalent to selecting the Shutdown option in Windows, as described above).

Method 2 - How to turn off your computer using the keyboard

While on the Desktop, press the key combination “Alt+F4”. A shutdown window appears.

Click the “Ok” button. We wait for the system unit to turn off and turn it off

Turn off the laptop

When turning off the laptop, the methods discussed above are available, but there is an easier way. You simply close its lid. It automatically goes into “sleep” mode, and in the event of further prolonged “rest”, it will automatically turn off, saving everything stored in RAM to the hard drive. When you turn on the computer again, all data will be restored to the state it was when you closed the laptop lid. This is the default behavior of the laptop, however, it can be changed.

Be careful, your laptop may behave differently when closing the lid!

The behavior of the laptop when the lid is closed can be customized and we will talk about this in a separate article.

Automatic computer shutdown according to schedule (timer)

In your daily interactions with your computer, you may need to turn it off while you are away. For example, the process of copying a CD or defragmenting a hard drive, or processing a video file takes a long time, and you need to go away or just go to bed. How to optimally organize the computer shutdown in this case?

There are several options:

  • Some programs have a designed function to automatically turn off the computer after completing assigned tasks (for example, uTorrent, Download Master);
  • standard Windows tools allow you to configure shutdown automatically by time;
  • There are third-party programs to automatically shut down your computer.

If you are still wondering what computer programs are, read.

As part of our “dialogue”, we will only consider using the standard “Task Scheduler” of the Windows system to organize the daily shutdown of the computer at a certain time of day. This is convenient, for example, for turning off the computer in the evening or at the end of the working day without your participation.

To get started with this program, go to the “Start” menu -> “Accessories” -> “Utilities”, select “Task Scheduler”.

We left-click on it and in the window that appears, select “Create a simple task...”

We call it arbitrarily, but it is clear to us, the planned action. Click the “Next” button...

We define the task trigger, that is, we set the mode of its execution.

Let's specify the time parameters.

In the next window we determine the required action. We are interested in “Running programs”.

We indicate the command to be executed and its additional parameters.

In the next window, after checking the entered data and clicking the “Finish” button, we will create a new task for the system.

Double-clicking with the left mouse button on it will open the task properties for editing.

The task will be completed at the appointed time. A minute before shutdown, the system will display a message on the screen about the upcoming shutdown of the computer. You can cancel the shutdown if you have time to perform a number of actions:

  • Press the key combination “Win+R” to open the “Run” command line window;
  • Type the command “shutdown –s” and press the “OK” button or just the “Enter” key.

The task will be cancelled. You can continue working further.

I hope that this information will help your computer to be “healthy” and efficient.