Fire Safety Encyclopedia

How to make a laptop turn off after a certain time. How to turn off the computer after a certain time

The computer shutdown timer will automatically shutdown your computer after a predetermined amount of time. At the end of the time interval, the personal computer will automatically shut down and shut down.

The Windows PC Shutdown Timer shuts down the computer completely, rather than putting the PC into sleep or hibernation modes. This function is in demand in different situations.

Often the user does not have the opportunity, for various reasons, to shut down the computer, and he does not want to leave the working PC unattended for a long time. The way out of this situation is to use a timer to turn off the computer after a while, specified by the user.

Shutting down a Windows 7 computer automatically using a timer is carried out by system means, or using third-party software. In this article, you will find instructions on how to set a shutdown timer for a Windows 7 computer using built-in system tools, without using third-party applications.

You can turn off your computer using a timer using Windows 7 tools. In this article, we will consider 5 ways to automatically shutdown a PC by system means: running a command in the Run dialog box, creating a shortcut to start a shutdown timer, shutting down the system after starting a ".bat" file, creating a task in Windows Task Scheduler, shutting down the system in the command line.

We start the shutdown timer of the Windows 7 computer in the Run dialog box - method 1

One of the easiest ways to shutdown your computer at a specific time is by using the command entered in the Run dialog box. Read more about the commands that can be used in the Run window.

  1. Press the "Win" + "R" keys on the keyboard.
  2. In the "Run" window, in the "Open" field, enter the command: "shutdown -s -t X" (without quotes), and then click on the "OK" button. "X" is the time in seconds before the computer automatically turns off.

A window will appear on the screen with a warning that Windows will shutdown after a certain time, in this case, after 10 minutes. Close the message box.

At the appointed time, Windows 7 will shut down on the computer.

How to turn off the shutdown timer of your Windows 7 computer in the Run window

If the user has changed plans and needs to cancel the shutdown of Windows, they will need to enter a command that cancels the previous shutdown command.

You can cancel the shutdown of Windows 7 only while waiting for the automatic shutdown of the computer:

  1. Press the "Win" + "R" keys.
  2. In the Run dialog box, enter the command: "shutdown -a" (without quotes), click the "OK" button.

The automatic shutdown of the computer in Windows 7 will be canceled.

How to turn off a computer by timer using a shortcut on the desktop - method 2

To quickly start a timer that will shutdown the system after a specified period of time, create a special shortcut on the computer desktop.

  1. Right-click on the Desktop.
  2. From the context menu, select New and then Shortcut.
  3. In the field "Specify the location of the object" enter the path: "C: \ Windows \ System32 \ shutdown.exe -s -t X" (without quotes), and then click on the "Next" button. "X" is the time in seconds until the system shutdown.

  1. In the window "What is the name of the shortcut?" enter any name convenient for you, click on the "Finish" button.

A shortcut will appear on the desktop to start the shutdown timer.

Select the appropriate icon for the shortcut:

  1. Right click on the shortcut, select Properties.
  2. In the "Properties" window, in the "Shortcut" tab, click on the "Change icon" button.
  3. In the "Change Icon" window, select the appropriate icon, and then click on the "OK" button.

A timer start icon with a clear picture will appear on the desktop.

To start the countdown for shutting down the operating system, double-click on the shortcut with the left mouse button.

Starting a timer to shutdown Windows 7 using a bat file - method 3

Another quick way to turn on the timer until the end of the operating system is to use an executable (batch) file with the ".bat" extension.

This file can be created using the Notepad included with Windows.

Open Notepad, enter one of the following commands:

Shutdown.exe -s -t X -c "message text" shutdown.exe -s -t X

The commands differ in that after the first command is executed, a message will appear on the screen stating that the computer will be turned off. Instead of the phrases "message text" write in English something like "computer off timer". "X" is the time in seconds until the system is turned off.

In the Save File window, in the File Type field, select All Files, and in the File Name field, enter any name with the extension .bat, for example, PC.bat.

To start the timer, click on the ".bat" file.

Shutting Down Windows 7 Computer in Task Scheduler - Method 4

Using Windows Task Scheduler, you can specify the time when the computer should be turned off.

On the computer.

In the main window of the scheduler, in the right column "Actions" select "Create a simple task ...".

In the "Create a simple task" window, give the task a name, for example, "Turn off the computer" (without quotes), and then click on the "Next" button.

In the "Task trigger" window, select the "Once" task launch, click the "Next" button.

In the next window, set the time for the task, and then click on the "Next" button.

In the Action window, select Run Program.

In the Run Program window, in the Program or script field, enter the path to the file:

C: \ Windows \ System32 \ shutdown.exe

In the "Add arguments (optional)" field, enter "-s" (without quotes), click on the "Next" button.

In the "Summary" window, review the settings, click on the "Finish" button.

Disabling the computer shutdown task in the Task Scheduler

In case of changing plans, the user can disable the task in the Task Scheduler.

In the main window of the Task Scheduler, in the left column, click on the option "Task Scheduler Library". Find the task, right-click on it, select "Disable" in the context menu.

How to turn off the computer via the command line on a timer - method 5

You can turn off your computer using the Windows 7 timer from the command line.

Run Command Prompt.

In the command line interpreter window, enter the command, and then press the "Enter" key:

Shutdown -s -t X

"X" is the time until Windows shutdown in seconds.

Windows 7 shutdown timer is running.

The user can choose the exact time to shut down the computer. In this case, you need to run the following command:

At XX: XX shutdown / s / f

"XX: XX" is the time when you should automatically turn off the computer.

How to cancel computer shutdown via command line

If necessary, the user can disable the timer function for shutting down the computer, launched in the command line.

Enter the Windows command prompt.

In the command prompt window, enter the command, and after entering the command, press "Enter":

Shutdown –a

The system shutdown will be canceled.

Conclusions of the article

Using the computer shutdown timer, the user can shut down the Windows 7 operating system at a specified time. The PC will automatically shutdown. You can run the command to shutdown the system in the Task Scheduler, in the Run window, in the command line, using a specially created shortcut, using the executable ".bat" file.

There are many programs and gadgets with different functionality for this, but in this article I will show how you can shut down, restart and put your computer to sleep using standard Windows tools.
This method was tested on Windows XP, Windows 7 and Windows 8.

For implementation, we need a "Task Scheduler" (or Tasks). It is located slightly differently in different versions of Windows.

V Windows XP :

Start - Control Panel - Scheduled Tasks shortcut


or

Start - All Programs - Accessories - System Tools - Scheduled Tasks

V Windows 7 :

Start - Control Panel - Administrative Tools - Task Schedule


or

Start - All Programs - Accessories - System Tools - Task Scheduler

V Windows 8 just enter "Task Schedule" on the initial screen and click on the tile in the parameters search results.

Before configuring the Scheduler, you need to see if its service is enabled. To do this, click win+r(Start -) and enter services.msc.
In this window, look for the "Task Scheduler" and look at its status. It should be "Works". If not, then right-click on it and select Run

Now let's proceed directly to setting up Task Scheduler.

For Windows XP:

Launch, click on "Add task"


Will appear Task Scheduling Wizard in which we select the desired task from the list, or search for it through Overview...


Then we carry out all sorts of settings using the Wizard. Nothing complicated.
At the end of all actions, you will need to enter a username and password.
The name can be found in the Computer property, and if there is no password, then leave the field blank.

For Windows 7 and Windows 8:

Launch the wizard by clicking on Create a simple task ...


we indicate the name and description. Then we select the trigger. In other words, the frequency of the task launch


for this trigger, you can specify the date and time of the task


choose an action. In this case, select "Run the program"


Well, now the fun begins. In principle, you can specify both in Windows XP and by clicking on the button Overview.. specifying the path to the executable file of the program. But I also want to draw your attention to the line "Add arguments". I will write about this below.


Then a window will appear with all the entered data, where you need to check everything again and agree by clicking Ready.

Now how using this method you can turn on, turn off, restart, etc. computer through time.

For shutting down the computer, a special utility program is responsible, which is located on the system disk in the \ WINDOWS \ system32 \ folder and is called shutdown.exe (you can find it there and run it right now. Just don’t be surprised if the computer displays a shutdown message).
The rundll32.exe program, which is also located there, is responsible for the sleep and hibernation mode.

So that's it. You can either create a file to run these programs with the parameters we need, or register them in the Scheduler.

Only XP does not support arguments and parameters. Therefore, you need to create a file for it.

Option 1 - specify the arguments for the program to shutdown, restart, sleep and hibernate.

Shutting down your computer

program:
argument: –r

Hibernation mode

program:
argument: powrprof.dll, SetSuspendState 0,1,0

Sleeping mode

program: C: \ Windows \ System32 \ rundll32.exe
argument: powrprof.dll, SetSuspendState

I show the screen for "Shutting down the computer" using the example of Windows 7:

Here is a small list of arguments that can be used on Windows:

-? - display of help for use (or without a key)

I - display of the graphical interface (when used, this key is put in front of all);

L - log off the system (incompatible with the –m switch);

- canceling the reboot / shutdown;

M - application of the operation to a remote computer with a name;

T N - timer for performing the operation in N seconds;

C "comment"- a comment to the operation (when used, a "comment" will be displayed in the window, it is obligatory to enclose it in double quotes on the command line, the comment should not be longer than 127 characters);

F - forced shutdown of applications without prior warning;

D [u] [p]: xx: yy - reason code;

u - custom code;

p - scheduled completion;

xx is the main reason code (1-255);

yy is an optional reason code (1-65535).

Option 2 - create a file with arguments for shutdown, restart, sleep and hibernation.

Everything is pretty simple here.
We create a new document in Notepad, write a command and an argument there (for example, I want to reboot with a timer of 16 seconds and so that the system warns me beforehand about closing applications), which will look like this:


Then we save it (File - Save As), in the "Save as type" field select "All files". You specify any name, but it should be bat


Well, then - we need to refer to this particular file when choosing a program in the Scheduler (remember where you chose using the button Overview...).

By the way, with the help of this Scheduler, you can make a kind of alarm clock - simply by specifying the path to the music as a file, and then specify the switch-on time at 8 am, for example.

Of course, to turn on the computer, you do not need to turn it off, but send it to Sleep or Hibernation, and then (for example, for an alarm clock) in the "Options" tab in its properties enable the option "Wake up the computer to start this task" - this is for Windows XP.


For Windows 7, you need to double-click on the task in the list and on the "Conditions" tab select "Wake up the computer to complete the task".

For some users, it becomes necessary to configure the 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 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, you can quickly find the command line through a 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:

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 characters "/ s" and "/ t".

These are the 2 parameters that I specified for the shutdown command. The "/ s" parameter means that the computer should be shut down, not rebooted, or simply log off. 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 re-enter the command line 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 scheme for turning off a computer by timer 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 computer shutdown at the right day and time?

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

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 we need some kind of file to run, which 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 into 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 computer shutdown command will be stored, after which we indicate any file name, but so that at the end there must be “.bat”, 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? The 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 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":

    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 the computer on a certain 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 extension ".bat", 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", an additional window of properties of 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 very 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 turn off.

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 list in the center, 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 following articles :)

In today's article, we will analyze in detail several ways how to set a timer to shutdown a computer Windows 7, 10, 8.1. Quite often, in everyday life, something like this may arise: you started the installation of some program or game on your computer, and then you urgently needed to leave on business. It's clear all day. There is a way out of this situation. Not all users know, but the computer can be configured so that it turns itself off after a certain period of time. You will learn how to turn off your computer after a certain time Windows 7 (10, 8.1) through the command line using the Windows scheduler and special programs from this article.

There are several ways to shut down your computer after a certain amount of time:

  1. Using the program Windows scheduler.
  2. Across command line.
  3. Taking advantage of special software.

Each of these options has its own pros and cons. Next, we will discuss each of them in detail, and you will not only learn how to turn off your computer after a certain time, but you can also choose the method that suits you more than others.

How to turn off the computer after a certain time through the command line

The easiest way to turn off your computer after a certain time is to use the command line. You can start it in several ways:

  1. Through the menu “ Start", Found in the section" All programs"Folder" Service”.
  2. Find file “ cmd"Which is stored on disk" C", in folder " Windows", in folder " System32”.
  3. You can also right-click on the desktop and select the option you want from the menu that opens, but this does not work on all versions of Windows.

Alternatively, you can also use the Run window instead of the command line. There are two ways to open it:

  1. Using the key combination “ Win +R”.
  2. By running the shortcut “ Execute", Which is located in the same folder" Service”.

The first option is easier, but on some PCs, the key combinations may be different or even absent.

After you start this window or command line, you will need to enter the command “ shutdown”. This command for the computer is a sign that you want to schedule something. And what exactly you want to schedule you must specify as follows:

  1. The first step is to specify what exactly your computer will have to do. You can schedule a reboot “ / r", Entering sleep mode" / h", Closing all programs" / f"And, of course, disable" / s”.
  2. Then you need to enter the argument “ / t”. This command indicates the setting of the timer in seconds.
  3. And at the end, indicate how long you want to carry out the planned action (in seconds).

All these commands are entered through a space, without quotes.... That is, for example, in order for your PC to turn off after one minute, you will need to enter the command “ shutdown /s /t 60”.

At first, this method may seem a little difficult, but once you figure it out at least once, it will surely become your favorite.

How to use the task scheduler

Before you begin to understand the work of the Windows Task Scheduler, it should be noted that this program appeared in this system only with the release of Windows 7. Therefore, if the version of your system software is lower, this method will not work for you how to turn off the computer after a certain time (Windows 10 and Windows 8 are also fine).

Task Scheduler is an extremely useful program that will help you create the most realistic timetable for your PC. To run it, you need to do the following:


After that, you can leave your PC and go about your business in peace.

If ever you want to re-launch.

How to turn off the computer after a certain time using the program

At the moment, there are many third-party software available to perform scheduled system shutdowns. We will not consider all of them, and we will analyze only the process of working with one of them, PC Auto Shutdown. You can of course choose any other program and use it. You can understand their work independently, only by fully studying this article and instructions, if any.

For now, let's get back to our program. Unfortunately, it does not have a Russian version, but a simple and clear interface allows you to use it on an intuitive level, and as a result, it turns out to be easier to work with than with some Russian-language applications. You can download it on the Internet absolutely free. After downloading, install and run the program, and then follow these steps:

  1. First, press the button “ Edit", In the" General”.
  2. In line " Timertitle”Enter the name of your option (any).
  3. Then just below select from the suggested commands, the command “ Shutdown”.
  4. Next, specify how long you want your computer to turn off after.
  5. The last setting item is the choice of the option startup interval, in order to turn off the PC once select “ Activateonceonlyattheabovetime”.

It remains only to press “ OK”- and the setting is over.

How to set a timer to turn off your computer Windows 7, 10, 8.1: video

This was the last option, how to turn off the computer after a certain time. This procedure may seem a little complicated due to the abundance of various incomprehensible commands and arguments, but in reality everything is much simpler than in words.

If you found the article "How to set a timer to turn off your computer Windows 7, 10" useful - share it with your friends on social networks and add to bookmarks

Similar publications