How To Automatically Shutdown Or Restart Windows After Specific Time
In many situations, you might look to shutdown Windows PC after a certain time. For instance, after music finishes or after the update of the software is completed. For this, you can schedule the auto shutdown very easily in Windows. Also, it is recommended to shut down instead of hibernating as there are some disadvantages of hibernating a Windows PC. So, this article will take you through ways to automatically shut down Windows after a specific time interval.
You can use these methods in Windows 7, 8 or 10 without any issues.
المحتويات
Ways To Automatically Shutdown Windows After Specific Time
1. Using Command Prompt
1. Open Command prompt.
2. Type the below command line:
الاغلاق -s -t XXXX
هنا XXXX is the time in seconds. So the only effort you have to make is to convert hours/minutes into seconds to make the laptop/PC shutdown after that specific time. For example: if you want to shut down the system after 1 hour then you can write the command as shutdown -s -t 3600.
3. Next, press enter. The timer will start and will make the computer shut down after XXXX seconds. You might also see a message that when your PC/laptop will shut down as shown in the screenshot.
How To Cancel Auto Shutdown
If you come across an important work on your laptop/PC and you want to cancel the timer you have set for the shutdown, then you can easily do it with just one command line.
Open Command Prompt and type in اغلاق-A لإلغاء الموقت.
Restart PC After Specific Amount Of Time
The method is same, you can use the same command line for the restart which you used for the shutdown. Just replace ‘s’ with ‘r’ letter and press enter. Here is how the command line will look like.
shutdown -r -t XXXX
Here also the XXXX is the time in seconds.
اقرأ أيضا: How To Turn On/Off Hibernate On Windows 8/10
2. Create Shortcut To Automatically Shutdown Or Restart
If you frequently need this feature then you can create a shortcut.
By creating a shortcut you will not need to write the commands again and again. Below are the steps to create the shutdown and restart shortcuts.
1. Right click on Desktop and navigate to جديد-> اختصار.
2. A window will open where you need to type in the command for shutdown or restart as shown in the screenshot below.
3. After this, click on التالى button and give some appropriate name to the shortcut. Like Shutdown after 1 hour and click on the نهاية .
From next time onwards you just need to double click to start the timer for the shutdown.
تلميح: You can create multiple shortcuts with different timers as per your requirements for easy and quick access.
Want To Change The Time Of The Shutdown Timer?
1) Right-click on the shortcut you have created and click on عقارات.
شنومكس) في الهدف field, you can change the الوقت . المقبل ، انقر فوق قم بالمشاركة.
So anytime you want to make changes in the timer, you can easily do it from shortcut properties.
Similarly, you can create a shortcut to cancel the timer by creating a shortcut icon with target field having اغلاق-A سطر الأوامر.
اقرأ أيضا: How To Change Low Battery Notification On Windows
3. Using Notepad Or Batch File
In this method, we will again be using some commands to create scheduled time and then save them as a batch file using Notepad. It is somewhat similar to the above method, but with a different command.
1. Open notepad and type the given command.
@ صدى
:W
if %time%==17:00:00.00 goto :X
goto :W
:X
shutdown.exe /s /f /t 60 /c “Time To Go”.
هنا %time%==17:00:00.00 is the time you want the PC to turn off. The time is in 24 Hrs format with HH:MM:SS: MS and “Time To Go” is the message that will be displayed when the time is about to come. You can also change as you wish.
2. After this, click on قم بتقديم وحدد حفظ ك.
3. Now, from حفظ كنوع حدد كل الانواع. Then name the file and add الخفافيش at the end and click on حفظ.
4. This will save the created batch file. Double click on it and a blank command prompt will open. Keep it opened until you are working on the PC as it will keep track of the real time and the time after which it has to shut down the PC.
As the time of shutdown comes near, it will notify you about the same and will turn off the PC in approximately 1 minute.
Below we have handpicked other Windows tutorials that might also be useful for you.
- How To Split Or Divide Screen On Windows
- How To Use Chkdsk Command To Scan And Fix Issues
- What Is SuperFetch And How To Enable/Disable It
- Disable WiFi Sense On Windows 10
في الختام
After following the above methods your PC will shut down automatically after/at the time you have set on any version of Windows you are using be it 7, 8 or 10. The only difference is that in the first two methods we are setting a timer while in the last one we are inputting the exact time it has to shut down. If you come across any issues while performing the steps, then you can let us know in the comments.
أحدث المقالات