Task Scheduler
The Task Scheduler is a Windows component that can automatically run tasks at a specific time or in response to a specific event. For example, tasks can be run when the computer starts or when a user logs in. You can start tasks when a specific event occurs and using task scheduler you can run commands and execute scripts on a specific day and time.
Getting Started
Search task scheduler in Windows search.
Right-click on Task Scheduler and click New Folder and give a name to the folder like Server Reboot and click OK.
Making a folder makes your tasks separate, so you can manage easily.
Now right-click on new created folder and select Create Task.
Give a task name and description and select Run whether user is logged on or not and select Run with highest privileges in General tab.
Now click on Triggers tab, which is for restart scheduling date and time. In my trigger I am choosing to run this task every week on Sunday only, you can choose based on your requirement.
Click New.. button to create a new trigger and select required details and click OK.
Now let’s go to Actions tab, click new button to create an action. Enter Program/script path and arguments and start in values and click OK.
Now select Conditions tab and keep power settings as it if nothing needed.
Now click on Settings tab. I am stopping my task if runs longer than 2 hours and click OK.
Now you can see your task is ready to run on given schedule if you want to run anytime just hit the Run button.
Conclusion
In this article, we have learned how to create a new task and set up a server restart using Windows 10 Task Scheduler.