Auto shutdown of the computer through the command line windows 10. Setting the timer for shutting down the computer through the Shutdown command manually. How to set an automatic shutdown timer through the Task Scheduler

For some users, it becomes necessary to configure shutdown of the computer on time or even on scheduled days at certain hours. The reasons may be different and the most commonplace is that you start watching a movie at night and don't want the computer to work until the morning if you suddenly fall asleep :) The same function is used by some on TVs and all for the same reason.

And the most interesting thing is that such a function in a computer is far from lying on the surface. It seems to be a computer, such an omnipotent device, but such a banal function is buried somewhere that a beginner will not find it!

So, from this article, you will learn how, using a simple command in the Windows console, you can configure the computer to turn off after a certain number of seconds, as well as how to configure the computer to turn off on time on certain days!

Beginners should not be intimidated by the words "Console", "Command line" and the like, since we are not talking about programming and other complex tasks! I'll show you an example and you will understand everything ...

So, now we will consider 2 ways to turn off your computer by time:

    Simple shutdown of the computer after a specified number of seconds;

    Turn off the computer on the specified day and time.

How do I set a timer to turn off my computer?

To accomplish this task, we only need the Windows command line.

In any operating system, find command line can be done quickly through the search. For example, in Windows XP, Windows Vista or Windows 7, open the Start menu and type “cmd” in the search at the bottom. The Command Prompt application appears in the list.

If you have Windows 8, then also open "Start", then click on the search icon on the right:

In the field that appears, type "cmd", and the "Command Prompt" program will immediately appear in the search results:

And finally, if you have the latest Microsoft development - Windows 10, then the default search icon will be located right next to the Start button. Click not on it, enter "cmd" and you see the "Command Line" application:

To complete our task, you may need administrator rights, and therefore, so that later not to look for the reason why the timer shutdown may not work, we will run the command line as administrator. To do this, right-click on the program icon and select "Run as administrator":

You should see a black command line window that looks like this:

Please note that if you have in this window instead of the path " C: \ Windows \ system32"The path to the user's folder is specified (for example," C: \ Users \ Ivan"), It means that you started the command line not as an administrator, but as an ordinary user! In this case, it is better to close it and reopen it as administrator.

After the command line has been launched, it remains to register one command correctly and you're done!

To shutdown and restart the computer, use the "shutdown" command from the Windows command line.

We type the following on the command line:

Where 3600 is the number of seconds after which your computer will shut down. If you press the "Enter" button on your keyboard now, your computer will be turned off after 1 hour, since one hour is exactly 3600 seconds. It is very simple to calculate :) We know that there are 60 seconds in one minute, and since there are 60 seconds in an hour, we multiply 60 by 60 and get 3600. For example, 1 hour 20 minutes is 4800 seconds.

Now for those symbols "/ s" and "/ t".

These are the 2 parameters that I specified for the shutdown command. The "/ s" parameter means that the computer should be turned off, and not rebooted, or simply log off the system. For example, to reboot, you need to specify instead of "/ s" - "/ r". Parameter "/ t" - allows you to set the time until the command is triggered. For example, if we specified the command without "/ t", i.e. like "shutdown / s", the computer would shut down instantly.

Now, I think you understand everything. Just enter your time before shutting down your computer and press the "Enter" key!

The command prompt window will close and the timing will begin immediately. In this case, you will be given a warning message, for example:

A warning of this format is issued when there are only a few minutes left before the computer is turned off.

But if you set a long timer, for example, for an hour or more, then when you start it, you will simply receive a notification in the system area:

If you suddenly decide to cancel the timer, then you need to enter the command line again and execute the following command there and press "Enter":

At the same time, in the system area you will receive a notification that the scheduled shutdown has been canceled:

This is how a simple timer shutdown scheme looks like.

Now let's consider a more interesting option - how to postpone the shutdown of the computer for a certain day and a specified time.

How to set up a computer shutdown on the right day and time?

To implement this feature, we need the Task Scheduler and Notepad system utilities.

Through the Windows Task Scheduler, you can schedule the execution of any program at a specific day and time, and even set a recurring task for different periods, for example, daily, weekly.

There is only one snag: through the scheduler it will not be possible to open the command line, as it was done, and write the shutdown command there. This is because in order to start we need some kind of file that can be specified in the scheduler and in which the command to turn off the computer will be put.

This question can be solved very simply! You need to open a notepad, write "shutdown / s / t 000" there, resave the text document to a file with the ".bat" extension (for example, "Shutdown.bat"), and then point to this file in the task scheduler.

And now we will consider in detail, point by point:

    Open Windows Notepad. It is available by default in any Windows system and you can find it in the "Start" menu, in the "Standard" category, or by searching for Windows and typing "Notepad".

    In the notebook we write: shutdown / s / t 000.

    Here, using the "shutdown" command, we specified the action to shutdown / restart the computer or log off.

    With the parameter "/ s" we specify the action - to turn off the PC!

    With the "/ t" parameter, we specify the timer before shutdown - 0 seconds, which means that the computer will shutdown instantly without delays.

    Here's how it should work:

    Re-save the notepad file to a file with the ".bat" extension. To do this, in the notepad, click "File"> "Save As".

    In the save window, we indicate the location where the file with the command to shutdown the computer will be stored, after which we indicate any file name, but so that at the end there must be “.bat” and not “.txt”:

    For example, like mine - "Shutdown.bat". The name before ".bat" can be anything!

    If you saved the file correctly, then it will look like this on the system:

    If it looks like a regular text document, then most likely you forgot to specify the ".bat" extension when saving, and therefore repeat this step.

    What is this BAT file? A file with the ".bat" extension allows executing Windows commands one after another, as well as various scripts. In our case, only one command is registered - to turn off the computer immediately.

    Open the task scheduler and configure the launch of the created Bat-file.

    The task scheduler is also built in by default in all Windows systems and you can find it by searching, or through the control panel: "Control Panel"> "System and Security"> "Administrative Tools".

    This is what the task scheduler looks like:

    In it on the right, in the "Actions" window, open the item "Create a simple task":

    A wizard for configuring the scheduled task will open, where you need to go through several steps. In the first window that appears, enter the name of the task, for example, "Turn off the computer" and click "Next":

    At the next step, you need to note when the planned task will be executed? It depends on when you want to shut down your computer. For example, you can set up a daily task execution and then you will need to specify the execution time. You can set up a weekly shutdown and then you can select specific days and times to complete the task.

    And if you just want to configure the shutdown of your computer on a specific day and time just one time, then select the "Once" item.

    Now, depending on which shutdown period you set in the previous step, you will need to specify the month / days / shutdown time. If you specified a one-time task execution ("Once"), then you only need to select the shutdown day and time.

    You can specify the date manually with numbers or select it using the calendar.

    After setting the shutdown date and time, click on the "Next" button:

    At the next stage, we select an action for the task. We mark "Run the program" and click "Next":

    In the next window, select our created file with the ".bat" extension, which contains the command to disable. Click on the "Browse" button and select this file on your hard disk, then click "Next":

    In the last window, mark the item marked in the image below and click "Finish":

    This option means that after clicking Finish, a additional window properties of the created task. We need this to enable the execution of the program with administrator rights.

    A window will open in which on the first tab "General" we mark the item "Run with the highest rights" at the bottom and click "OK":

Everything! The scheduled task has been created. Now, as soon as the date and time specified by you comes, the computer will immediately shut down.

If you suddenly want to change any parameters of a scheduled task, then open the task scheduler again, in the left part of the window, select “Task Scheduler Library”, in the center list, right-click on the task you created, and select “Properties” from the menu that opens. :

A window will open where, on several tabs, you can change all those parameters that you configured!

In this way, you can configure the shutdown of the computer by time (timer), as well as schedule the shutdown for any day and time, and even set up a regular task execution. I am sure that such an opportunity may be useful to someone.

See you in the next articles :)

Sooner or later, many users need to automatically turn off their PC. This may be due, for example, to nightly downloads of movies, games or other files. It's no secret that some operators have night traffic much cheaper than daytime.

A large number of users have already switched to Windows 10, so today we will analyze the shutdown timer for windows 10.

There are many ways to use this simple function. Among them there are both third-party programs for the OS and also system tools.

1 way - the "Run" menu

The first and one of the easiest ways to set a computer shutdown timer on windows 10 is to use the Run utility. The key combination "win" and "R" is used to launch it. After it is launched, you need to enter the following command in it:

N - means the number of seconds after which the computer turns off. For example, we want the PC to shutdown after 15 minutes. 15 * 6 = 900. So our line will look like this:

After we click OK, we will be shown a corresponding message.

Now, after 15 minutes, our PC will shut down. At the same time, we will be offered to save all open documents and so on. Everything is like a normal shutdown. If we need programs to close forcibly, then we add -f to our line. It looks like this:

Vin will now stop all applications and shut down the computer.

In case we change our minds to turn off the system, there is a way to turn off the shutdown timer of windows 10. To do this, you need to open "execute" again and enter the following line:

We will be informed that the disconnection has been canceled.

This method may not be very convenient, so you can use another option. We will create a "shortcut" on the desktop that will activate the PC shutdown timer.

Method 2 - shutdown via shortcut

For you need to create a shortcut on the desktop

In the window that appears, enter the required PC shutdown parameter, again select 15 minutes

After that we will need to come up with a name for our shortcut

By clicking on the "Finish" button, a new shortcut will appear, activating the shutdown of the computer.

Method 3 - task scheduler

Another easy way to set the shutdown timer on windows 10 is to use the task scheduler.

To access this service, use the "Run" menu again

A window will open in front of us in which we will need to select the item "Create a simple task"

Then, we will be prompted to enter a name for the task

Now we indicate the frequency with which the task will be performed

Now we set the task execution time

Now you need to select the action to be performed

In the last window, you will need to enter the shutdown command, the argument will be -s

Now the task scheduler will launch the specified program and turn off the PC at the appointed time.

So, we have disassembled simple ways setting the shutdown timer on windows 10. With the help of such tools, we can make sure that the computer does not work more than it should be and remains off when we are not using it.

Of course, there are many third-party applications that perform similar functions, but they will be easy enough to understand, since most of them have a convenient and intuitive interface.

If you need to turn off your computer at a specific time when you will not have access to it, you can use the timer. Not everyone knows that Microsoft programmers equipped Windows 10 with a timer, but you can also use extraneous programs to shut down your PC.

There are several ways to start the shutdown timer on your computer, depending on which option works best for you.

Windows tools

You can turn off the device using standard options.

Using the Run window

This method is suitable for Windows 7, 8 and 10. For this, there is a special command that will turn off the PC after a certain time:

After the specified time, the computer will shutdown as usual, closing and saving information in all programs. If you need to set a forced exit from the OS, add the parameter to the command: -f.

Healthy! To cancel the command, enter: shutdown –a

Create shortcut or bat file

To avoid entering a command every time, create a shortcut or bat-file that runs it.

Label

bat file

In a command country


In the task planner


Special programs

You can turn off your computer at a specific time special programs, not just Windows tools.

Last Task


AIMP

Power button and shutdown computer at

In addition to shutting down your Windows 10 PC as usual, you can always set a timer. For example, when leaving home on urgent matters, you want to download a movie so that you can watch it immediately upon returning home. Let's say this is a publicly available documentary (so that no one is convicted of piracy). You need to run away in 5 minutes, and the film will swing for another hour. The solution is to set a timer so that the computer automatically turns off after 80 minutes (with a margin).

How to teach a PC to shutdown itself

Windows, at least XP, at least 10, has built-in tools for automatic shutdown computer. Alternatively, you can install a third party program. There is no point in describing each in detail, they all have a clear interface and successfully cope with their task. Here is a list of the most popular such apps:

  • SM Timer
  • PowerOff
  • Auto PowerOFF
  • Airytec Switch Off
  • sleep timer

For example, here is the SM Timer mini-program window:

How to set a timer with her, a preschooler will figure it out.

Standard OS tools

But why clutter operating system when are there built-in capabilities? Both Windows XP, Vista, and 7, 8, 10 allow you to set the timer in exactly the same way through the Run line. Just hold down the Win key (with the Windows icon) on your keyboard and "R" at the same time. A window will open in which enter the following formula:

shutdown -s -t 1800

The number at the end is the number of seconds after which the timer will automatically shutdown the computer. The example specifies 1800 seconds, which is 30 minutes. A command in the form of shutdown -s -t 1800 -f will forcibly close all programs when the computer is turned off. By starting the window again and typing shutdown -a you will cancel the set timer.

In Windows XP, 10 and any other modern version, you can improve this method - create a shortcut to turn off the computer after a certain time. For this:

  • Right click on an empty desktop.
  • Click “Create Shortcut”.

  • In the location field, write: C: \ Windows \ System32 \ shutdown.exe -s -t 1800 (or whatever number of seconds you need).
  • Click next.

You can write any name to the shortcut and make them as many as you like to shutdown the computer after 30 minutes, an hour, two hours, and so on. As you might guess, you can also do the undo button. To make them all look pretty, click on any of the shortcuts and select "Properties" - "Shortcut" - "Change Icon". You can choose from both the Windows 10 system icons and from any folder.

You can also set a timer to automatically shutdown your computer after a certain time through the built-in Windows 10 Task Scheduler. To do this, follow these steps:

  • Hold Win + R.
  • In the Run box, enter taskschd.msc.
  • The Scheduler will open (you can also find it through Start).
  • In “Actions” select “Create Basic Task”.

  • Come up with a name and click next.
  • Set the value to "Once", then.
  • Select the launch date and time, then.
  • Highlight the "Run Program" item.
  • The program or script is shutdown, the -s argument (with a hyphen).

The automatic shutdown of the computer after a certain period of time is a feature of the Windows operating system that is not obvious to users. At the same time, it is implemented in software from Microsoft, but not everyone knows about it. Also set the timer to turn off Windows computer 10 or earlier versions of operating systems can be used with third-party programs that have a more "user-friendly" interface, but they must be downloaded separately. We propose to consider how to set a scheduled shutdown of the computer after a certain period of time using the command line.

How to set timer to shutdown Windows 10 computer using command line?

Attention: The method of automatically turning off your 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 has designed the Windows operating system that users may need to shutdown their computer after a few hours or minutes. Moreover, 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 you can only get to it through the command line. To set the computer shutdown timer using standard Windows tools:


The Windows Command Prompt also supports a number of other shutdown-related commands. We suggest that you familiarize yourself with them, since the combination of commands allows you to achieve the desired results in automating the process of shutting down the computer at a certain time or after a specified time.

Windows command line switches

When using the shutdown command to shutdown the computer, you should be aware of the parameters entered after it, which are set by letter keys. The key can be written after a dash (examples: -a, -p, -h) or a 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 (that is, in English).

Windows command line parameters for shutdown command:


Please note: you can see the complete list of parameters that are supposed to be used with the shutdown command yourself. To do this, it is enough to register the following combination of functions "shutdown /?" In the MS DOS command line. To do this, start the standard Windows command line (Windows key + R key combination), write the cmd.exe command in it, and then write “shutdown /?” In the MS DOS command line window that opens.

How to create a convenient timer to turn off your computer on Windows 10 after a specific time?

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

Creating a shutdown timer shortcut on Windows 10 is simple:


By clicking twice with the left mouse button on the created shortcut, you can easily run the command that is registered 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. Often times, these shortcuts are created by system administrators for employees who need to leave computers on at the end of a shift in order to process certain tasks.