First, open the Start menu and click on the Task Scheduler in the Admin tool.
Then click Create the basic task in the Task Scheduler window.
A custom named naming task name, such as a timed shutdown in a picture.
Custom Check task triggers, such as one in the picture.
Tick the Start program and click Next.
Select a program or script C:windowssystem32shutdown.exe, because the Windows system shutdown command is performed by Shutdown.exe.
Important reminder: Remember to add the parameter "s" to the input box to turn off the local computer. In addition, if the input parameter "-r" indicates that the computer is shut down and restarted.
When you have finished setting up, click Finish.