In this post, we will discuss how to use Task Scheduler for Windows computer to automatic reboot at specific time.
How does the Task Scheduler work?
Task Scheduler is a built-in utility in Windows that allows you to automate the execution of tasks (programs or scripts) on a specified schedule or under certain conditions. It acts as a Windows job scheduler, automatically running tasks at defined times or in response to specific system events without needing manual intervention.
Getting Started
If you want to use Task Scheduler in Windows to automatically restart your computer at a specific time or after a set interval, you can easily set this up. Here's how you can configure it:
Steps to Set Up Task Scheduler to Restart the Computer:
1. Open Task Scheduler
- Press
Win + R
- The Run will appear on screen.
- Type
taskschd.msc
, and press Enter. - This will open the Task Scheduler.
2. Create a New Task
- In the Task Scheduler window, in the right-hand pane, click on Create Basic Task....
3. Name Your Task
- Give your task a name like "Restart Computer" and click Next.
4. Set the Trigger
- You'll need to choose when you want the computer to restart. You can choose:
- Daily: To restart the computer every day at a specific time.
- Weekly: To restart at a certain time every week.
- One Time: To schedule a one-time restart.
- When the computer starts: To schedule a restart when the computer boots up.
For example, if you want to restart daily at 2:00 AM, select Daily, and then specify the time.
- Click Next.
5. Choose the Action
- Select Start a Program and click Next.
6. Specify the Program to Start
- In the Program/script field, enter:
shutdown
- In the Add arguments (optional) field, enter:
/r /f /t 0
This command forces the computer to restart immediately:
/r
— Restart the computer./f
— Forces running applications to close./t 0
— Specifies the time delay before the restart (0 means immediate).
- Click Next.
7. Review and Finish
- Review your task settings. If everything looks good, click Finish.
Customizing the Task Further (Optional)
If you want to add extra customization, such as ensuring that the task only runs when the computer is idle or specifying conditions for the restart, you can follow these steps:
- Edit the Task
- After completing the basic setup, find your task in the Task Scheduler Library on the left panel. Right-click it and choose Properties.
- Conditions Tab (Optional)
- Here you can choose additional conditions for your task to run, such as:
- Only run the task if the computer is idle for a specified period.
- Only run if the computer is plugged into a power source (if you're on a laptop).
- Here you can choose additional conditions for your task to run, such as:
- Settings Tab (Optional)
- Set the task to:
- Allow task to be run on demand.
- Stop the task if it runs longer than... (to avoid issues if the task doesn't complete).
- If the task fails, restart every... (useful if you want a retry mechanism).
- If the task is already running, do not start a new instance.
- Set the task to:
- OK to Save
- Once you've adjusted the settings, click OK to save the task.
Now, your computer should restart automatically based on the schedule you've set! Let me know in comment if you need help with any particular step or if you'd like to adjust the task in a specific way.
Thanks
Helpful blog, thanks for sharing
ReplyDelete