How to set your computer to turn off automatically. Turn off the computer on a timer

Most users are accustomed to shutting down their computer using the start menu. If they heard about the possibility of doing this through the command line, they never tried to use it. All this is due to the prejudice that it is something very complex, intended exclusively for professionals in the field of computer technology. Meanwhile, using the command line is very convenient and provides the user with many additional features.

To turn off the computer using the command line, the user needs to know two fundamental things:

  • How to call the command line;
  • What command to turn off the computer.

Let's dwell on these points in more detail.

Command line call

Calling the command line, or as it is also called, the console, is very simple in Windows. This is done in two steps:


The result of the actions performed will be the opening of the console window. It looks approximately the same for all versions of Windows.


You can call the console in Windows in other ways, but they are all more complex and may differ in different versions of the operating system. The method described above is the simplest and most versatile.

Option 1: Shutdown the local computer

The shutdown command is used to shut down the computer from the command line. But if you just type it in the console, the computer will not turn off. Instead, help will be displayed on how to use the command.


After carefully studying the help, the user will understand that to turn off the computer, you must use the command shutdown with parameter [s]. The line typed into the console should look like this:

shutdown /s

After entering it, press the key Enter and the system shutdown process will begin.

Option 2: Using a Timer

Entering the command in the console shutdown /s, the user will see that the shutdown of the computer has not yet begun, but instead a warning appears on the screen that the computer will be turned off in a minute. This is how it looks in Windows 10:


This is because such a delay in time is provided in this command by default.

For cases when the computer needs to be turned off immediately, or at a different time interval, in the command shutdown parameter provided [t]. After entering this parameter, you must also specify the time interval in seconds. If it is necessary to turn off the computer immediately, its value is set to zero.

shutdown /s /t0

In this example, the computer will shut down after 5 minutes.


A system termination message will be displayed on the screen in the same way as in the case of using a command without a timer.


This message will be repeated periodically indicating the remaining time until the computer is turned off.

Option 3: Shutdown the remote computer

One of the advantages of shutting down the computer using the command line is that in this way you can turn off not only the local computer, but also the remote computer. For this, the team shutdown parameter provided [m].

When using this parameter, it is mandatory to specify the network name of the remote computer, or its IP address. The command format looks like this:

shutdown /s /m \\192.168.1.5

As with the local computer, a timer can be used to shut down a remote machine. To do this, you need to add the appropriate parameter to the command. In the example below, the remote computer will shut down after 5 minutes.

To shut down a computer on the network, remote control must be enabled on it, and the user who will perform this action must have administrator rights.

You could get acquainted with several simple, and not very, programs for these purposes. Programs are good because they do not require installation. Unpacked, launched, configured once and everything works. Yesterday, that's how my computer turned off. Usually in the evening, like this, you need to look on the Internet and this. Things are not important and not urgent, but they take a decent amount of time. Because of this, you go to bed late, you don’t get enough sleep in the morning and the whole day is messed up. Here, what would stop this works great. But, you can do without programs. Built-in operating system tools. Read on or watch the video at the end of the article.

Task Scheduler is a great tool for automating computer shutdown

To be honest, I rarely use this utility. However, in this case, its use is an excellent solution to our problem. Let's start the task scheduler. Open the main Start menu and select Control Panel. In Windows 8, select System and Security > Administrative Tools. In the list that appears, select Task Scheduler. In Windows 7, you can use the search in the Start menu

The Task Scheduler window opens. We pay attention to the right side. Action section. Select Create a simple task...

In the opened window, in the Name field, name the task to be created. For example Shutdown. If you want, you can briefly describe the task you are creating. Click Next >

Set the frequency of starting the task to automatically shut down the computer. I'll put it daily, Discipline is everything). Click Next >

After that, you need to set the task execution time. I’ll put it on earlier, so that every day I get up with my right foot. Click Next >

Choose to run the program (that is, do not touch anything) and click Next>

In the Program or script field, write "shutdown". In the Add arguments: field, write "/s". Click Next >

In the Finish section, click Finish

The task to automatically turn off the computer at a specified time has been created. Now, in order to edit it, you need to start the Task Scheduler again and select the Task Scheduler Library on the left side. In the middle part at the top you will see a table in which you will find the task you created. If you need to delete a task, then in the right column Actions select Delete

To edit the selected task, select Properties (above the Delete function). Go to the Triggers tab, select an entry in the table and click Edit…

Now you can schedule automatic computer shutdown at any time without the use of third-party programs.

Shutting down the computer automatically using the command line or the Run utility

If you need to perform a one-time shutdown of the computer, then this procedure can be made even easier. Using the Run utility. Open the Start menu in Windows 7 and select Run. You can find out how to make a Start button in Windows 8. In Windows 8, the Run utility can be found through Search, just like in Windows 7

In the Run window that opens, we write the already known command “shutdown / s / t 600”. Instead of 600, write the desired time in seconds before turning off the computer. And click OK

At the same time, you will immediately see a warning that your session will be terminated after the time you have selected. Click the Close button

If you need to cancel the automatic shutdown of the computer, then call the Run utility again, Enter the command "shutdown / a" and click OK

In the notification area, you will see the message "Logout canceled"

In this way, you can schedule the computer to turn off at the desired time. There is only one inconvenience - you need to calculate the number of minutes before turning off. If the time can be calculated approximately, then this is a great option for automatically shutting down the computer.

Conclusion

In this article, you learned how to auto shutdown computer using the built-in tools of the Windows operating system. These are the Task Scheduler and the built-in Run utility. Before writing this article, I thought about the Scheduler as something complicated and unnecessary. Now you can easily schedule any task, including automatic computer shutdown. The same is true for the Run utility. Previously used to call the command line.

There is another easy way to automatically turn off your computer. This is the use of gadgets. How to do it in Windows 7, see the video below

In various cases, it becomes possible to turn off the computer at a specified time. For example, in the evening before going to bed, when watching a movie, automatically turning off the computer will help you not to worry about it if you fall asleep.

Setting up automatic shutdown of the computer is very simple, besides, everything can be done using standard Windows tools, using the Task Scheduler, or in some other ways, which we will discuss below.

"Task Scheduler" is located in the "Administration" section of the Control Panel. Run it and create a simple task. Following the instructions of the wizard for creating tasks, specify the name of the task, select the frequency of the task launch, for example, daily. Next, you should specify the time and day from which our task of turning off the computer will be performed. In the "Action" section, select an action for the "Run the program" task. At the next step, you will need to specify the program to be launched, or rather, the script (command) to turn off the computer. Type SHUTDOWN on the "Program or Script" line, and -s -f on the "Add Arguments (Optional)" line. At the last stage, the wizard will offer to check all the parameters of the created task, and if everything is correct, then finish the creation by clicking the "Finish" button. The images below show the steps in order.

You can also configure automatic shutdown of the computer using the command line. This method is of course much simpler, though if you have ever worked with the command line. To do this, go to the menu (Start - All Programs - Accessories - Command Prompt) and write the command "shutdown /?" and press the Enter key.

After that, the parameters of our utility will appear in the command line window. In this window, we are interested in the main three parameters that are shown in the image.

What do we have and how can we use these commands?

For example, to turn off the computer after 2 hours, we need to write the command like this (shutdown -s -t 7200), and then press the Enter key. To set the right time, we need to convert hours and minutes to seconds. 7200 seconds equals 2 hours.

To cancel the specified shutdown of the computer, we need to enter the command "shutdown with the -a option". That is, we enter "shutdown -a" like this.

Also, this action can be done through the "Run" command. The image shows where this item is located.

To cancel the task, we write in the same way as in the command line "shutdown -a"

Now you know how to create an automatic computer shutdown. In conclusion, I would like to say that some programs have the ability to automatically turn off the computer upon completion of some action. These are antivirus scanners, torrent clients, defragmentation programs and others.

In our life, situations may arise when we urgently need to leave the computer, which cannot be turned off immediately for various reasons. To solve this and similar issues, there is a shutdown command that allows you to turn off the computer after a scheduled time, restart it, enter it into mode, log out of our account, and much more. In this article, I will talk about shutdown - the command to shut down and restart the Windows OS, describe the features of its keys, and also explain how it is more convenient to use the specified command when working with your computer.

Most users turn off their computer using the start menu, using the Alt+F4 menu, or by simply pressing the PC's power button.

An alternative to this can be the shutdown command (translated from English. "Shutting down" - shutdown). The functionality of this command allows you to turn off your computer (both immediately and after a while), restart it, put it into hibernation mode, and log out of your account. Also, set the shutdown features in a special graphical window, perform other actions that allow you to customize the PC shutdown process for the needs of a particular user.

The command supports both local computer shutdown and remote shutdown, allowing you to disable (reboot, hibernate, etc.) other PCs on your network (requires administrator rights).

How to use SHUTDOWN

You can activate shutdown either using the classic command line or using the PowerShell toolkit. You can also make it easier to work with the command by creating a shortcut to run it on the desktop.

To start working with the command (click on the "Start" button, type cmd in the search bar, and press enter). I recommend running the command line as an administrator on the video:

The functionality of the shutdown command is as follows:

From the whole clip of keys, I would note the following:

shutdown /a - the command stops the shutdown or reboot process. It can be useful in a situation where Windows Update has decided to restart your computer (or when you or some third-party program has started the restart process);

shutdown /s - PC shutdown command;

shutdown / r - PC reboot command;

shutdown /g - the functionality of the key is similar to shutdown /r (the computer restarts), while all registered applications are restarted;

shutdown / h - putting the computer into hibernation mode;

shutdown /l - exit from the current user account (log off);

shutdown /p - shutdown the computer without appropriate warnings. Equivalent to shutdown /s /f /t 0.

SHUTDOWN Command - Implementation Examples

Let's look at popular examples of using the shutdown command:

Example #1. Power off the computer immediately

At the command line, type:

shutdown /s /t0

Type the command with the specified switches on the command line

Example #2. Power off the computer with a delay

On the command line, use the command:

shutdown /s /t 3600 (3600 is the time in seconds, in this example it is 60 minutes, i.e. one hour). Instead of 3600, put any time convenient for you by calculating its indicator in seconds;

Example #3. Restart your computer immediately

shutdown /r /t0

Example number 4. Putting the PC into hibernation mode

Type - shutdown / h / t 0

Example number 5. End the session of the current user

Example number 6. Stop computer shutdown

If you change your mind about turning off the computer, or want to prevent such a shutdown by the system, then type in the command line:

Example number 7. Restarting a remote computer by IP address

shutdown /r /m \\192.168.0.1

This command allows you to restart the computer with the specified network address, provided that you have the appropriate administrative rights.

Example number 8. Turn off a remote computer by its network name

shutdown /s /t 300 /m \\COMP1

The command turns off the power of COMP1 network computer after 5 minutes (300 seconds).

Example #9. Run the showdown graphic utility

After launch, the “Remote shutdown dialog” sign will appear on the screen.

Using the "Add" button, you must specify the IP address or name of the desired computer, select the desired action, and then fill out the "Note" form (this text will be displayed in a warning about the action you have planned).

Example number 10. We reboot the PC with the restoration of the work of registered applications

Automating the process by creating shortcuts

You can also easily arrange the command you need as a shortcut placed on the desktop. Then, when you need to perform the specified operation, it will be enough to click on the shortcut, and the command will be executed.

To carry out this operation, do the following:


Conclusion

The shutdown command allows you to perform the necessary operations to shut down and restart your computer. If the functionality of this tool did not suit you, then you can turn to the capabilities of such programs as "Shutdown Timer", "Time PC", "Shutdown Scheduler" and other analogues that allow you to turn off the PC at the time you set.

In contact with

Some users need to configure the computer to turn off according to time or even on scheduled days at certain hours. The reasons can be different, and the most banal one is that you already start watching some 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 being on the surface. It seems that a computer is such an omnipotent device, but such a banal function is somewhere tucked away 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 set the computer to turn off at a certain time on certain days!

Beginners should not be afraid of 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'll understand...

So, now we will consider 2 ways to turn off the computer in time:

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

    Turn off the computer on the specified day and time.

How to set a timer to turn off the computer?

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

In any operating system, you can quickly find the command line through the search. For example, in Windows XP, Windows Vista or Windows 7, open the Start menu and type "cmd" in the search box 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 development from Microsoft - Windows 10, then the default search icon will be located right next to the Start button. Click on it, enter "cmd" and you will see the "Command Prompt" application:

To complete our task, administrator rights may be required, and therefore, in order not to look for the reason why the timer shutdown may not work, we will run the command line as an administrator. To do this, right-click on the program icon and select "Run as administrator":

You should have a black command prompt window that looks like this:

Please note that if you have in this window instead of the path " C:\Windows\system32' specifies the path to the user's folder (for example, ' C:\Users\John”), then you did not run the command line as an administrator, but as a regular user! In this case, it is better to close it and open it again as an administrator.

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

Shutdown command is used to shut down and restart the computer at the Windows command prompt.

We type the following on the command line:

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

Now with regard to these characters "/s" and "/t".

These are the 2 options I specified for the shutdown command. The "/s" parameter means that the computer should just shut down, and not restart or simply log out. For example, to reboot, you need to specify “/ r” instead of “/ s”. Parameter "/t" - allows you to set the time before the command is triggered. For example, if we specified a command without "/t", i.e. like this "shutdown / s", then the computer would turn off instantly.

Now, I think you understand everything. Just specify your time before turning off the computer and press the "Enter" key!

The command line window will close and the countdown will start immediately. This will give you a warning message, for example:

A warning of this format is issued when only a few minutes are 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 action of the timer, then you need to enter the command line again and execute the following command there and press "Enter":

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

This is how a simple scheme for turning off a computer on a timer looks like.

And now let's consider a more interesting option - how to postpone turning off the computer for a certain day and a specified time.

How to set the computer to turn off at the right day and time?

To implement this possibility, we need the system utility "Task Scheduler" and "Notepad".

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

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

This issue is very easy to solve! You need to open a notepad, write “shutdown / s / t 000” there, re-save the text document to a file with the “.bat” extension (for example, “Shutdown.bat”), and then point to this file in the task scheduler.

Now let's take a closer look, point by point:

    Open Windows notepad. It is available by default in any Windows system and can be found in the Start menu, in the Accessories category, or by searching for Windows and typing Notepad.

    In notepad write: shutdown /s /t 000.

    Here, using the “shutdown” command, we indicated the action to shutdown / restart the computer or log off the system.

    With the “/s” parameter, we specify the action - to perform exactly shutting down the PC!

    With the “/t” parameter, we specify a timer before shutdown - 0 seconds, which means that the computer will turn off instantly without delay.

    Here's how it should turn out:

    Resave the notepad file to a file with the “.bat” extension. To do this, in Notepad, click File > Save As.

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

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

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

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

    What is this BAT file? A file with the “.bat” extension allows you to execute Windows commands one by one, as well as various scripts. In our case, only one command is registered - turn off the computer immediately.

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

    The Task Scheduler is also built into all Windows systems by default and can be found 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":

    The scheduled task setup wizard 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":

    In the next step, you need to mark when the scheduled task will be performed? It depends on when you want to turn off your computer. For example, you can set the task to run daily, 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 set up a one-time shutdown of the computer on a specific day and 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/time to turn off. If you specified a one-time execution of the task ("Once"), then you need to select only the day and time to turn off.

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

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

    In the next step, 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, where the shutdown command is laid. Click on the "Browse" button and select this file on your hard drive, 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", an additional window of properties for the created task will open. 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 highest rights" below and click "OK":

Everything! The scheduled task has been created. Now, as soon as the date and time you specified arrive, the computer will immediately turn off.

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

A window will open where on several tabs you can change all the settings that you configured!

In this way, you can set the computer to turn off by time (timer), as well as schedule a shutdown for any day and time, and even set up a regular task execution. I'm sure this feature will be useful to someone.

See you in the next posts :)

CATEGORIES

POPULAR ARTICLES

2022 "mobi-up.ru" - Garden plants. Interesting about flowers. Perennial flowers and shrubs