10
You can shut down your PC automatically after a certain period of time. There are several methods available for doing this.
Shutting down the PC automatically after a certain period of time: This is how it works with shutdown.exe
You don’t need any extra tools to turn off your computer or laptop automatically after a certain period of time. Windows can do this natively via the Windows console.
- Press the [Win] + [R] key combination on your keyboard to open the Run window and type cmd. Click OK to confirm.
- Then enter the command shutdown -s -t xxxx. The xxxx stands for the time in seconds after which the PC should turn off. For example, two hours is 7200 seconds, while four hours is 14400 seconds.
- If you want to shut down the PC directly, you do not need the -t xxxx specification. Press [Enter] to confirm the shutdown command.
- You can also create an executable shortcut for this. To do so, right-click on the desktop, select New and then Shortcut. Enter the code in the field for the storage location, follow the further steps and save everything at the end with Finish.
- You can use the shortcut to execute the shutdown command without the console. Alternatively, simply enter the entire command in the search bar and confirm. This also means you don’t have to open the console.
- Note: If you want to cancel the shutdown, type shutdown -a. If you did not want to turn off the computer, but to retire or restart, insert either -h or -n. For more options, type in the Windows console only shutdown and Windows will present you with all the available commands.
Automatically shut down your PC using Windows Task Scheduler: Instructions
You can also use Windows Task Scheduler to automatically shut down your PC.
- Note: You can use Task Scheduler to automate the process. For example, you can set your PC to automatically turn off at midnight from Monday to Friday if you have not used it for 30 minutes before then.
- To do this, open the Run window again, enter taskschd.msc and confirm by clicking OK. Alternatively, you can enter Task Scheduler in the search field.
- Click on Create Task under Action in the upper right corner. Under General, define any name for the action, for example Shutdown.
- Then check Run with highest privileges so that the shutdown is not interrupted by another action. In the Triggers tab, define a trigger that starts the action.
- To do this, click on New and enter the desired time. You can have the event repeated daily, weekly or monthly. For example, you can select weekly and check the days from Monday to Friday.
- Enter the command shutdown in the Actions tab. Under Conditions, you can specify that the PC should only be switched off if it has not been used.
- This is done by checking the box Start task only if the computer is idle. For example, enter 30 minutes as the time and then check the box Restart after long periods of idleness.
- Furthermore, the Settings tab can be used to define what happens if the task cannot be executed. You can specify that the task should be repeated after 30 minutes. To do this, check the appropriate box and specify the desired time.
Automatically shut down PC: Use power plan
It is also possible to automatically put the computer into hibernation mode. To do this, use your system’s power plan.
- In the Windows search bar, enter the term “power plan”. Select the application with your mouse to open it.
- Click on Edit plan settings and then on the option Change advanced power settings. In these, you can specify exactly when the PC should go into hibernation mode.
- Navigate to Power saving and click on the plus symbol to display the advanced menu. Select “Hibernate after”.
- There you can decide after how many minutes of inactivity you want the PC to go into hibernation mode by clicking on the text highlighted in blue. Enter the desired number of minutes.
- Click Apply to confirm the change. You can then exit the menu by clicking OK.