Knowledge Base Windows

How to Schedule Automatic Restarts on a Windows VPS

Windows Β· 2 min read

Four methods to schedule automatic restarts on a Windows VPS: Task Scheduler, Command Prompt, Group Policy Editor, and Registry Editor.

There are several ways to set up automatic restarts in Windows depending on your needs.

1. Using Task Scheduler (Recurring Schedule)

Best for scheduling regular restarts (daily, weekly, monthly).

  1. Press Win + R, type taskschd.msc, press Enter
  2. Click Create Basic Task in the right panel
  3. Give the task a name (e.g. Auto Restart), click Next
  4. Choose the frequency: Daily, Weekly, or Monthly
  5. Set the start time and date
  6. Select Start a Program, click Next
  7. In Program/script, type: shutdown
  8. In Add arguments, enter: /r /f /t 0
    • /r = Restart
    • /f = Force close all apps
    • /t 0 = No delay
  9. Click Finish

2. Using Command Prompt (One-Time)

Best for scheduling a single restart without setting up Task Scheduler.

# Restart in 1 hour (3600 seconds)
shutdown /r /f /t 3600

# Restart in 10 minutes
shutdown /r /f /t 600

# Cancel a scheduled restart
shutdown /a

3. Using Group Policy Editor (Network)

Best for administrators managing restarts across multiple computers.

  1. Press Win + R, type gpedit.msc, press Enter
  2. Navigate to: Computer Configuration > Administrative Templates > Windows Components > Windows Update
  3. Find No auto-restart with logged on users for scheduled automatic updates
  4. Set it to Enabled so Windows only restarts when no users are logged in
  5. Click Apply β†’ OK

4. Using Registry Editor (Prevent Automatic Restarts)

Best for preventing Windows from restarting automatically after updates.

  1. Press Win + R, type regedit, press Enter
  2. Navigate to:
    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU
    
  3. Create a new DWORD (32-bit) Value named NoAutoRebootWithLoggedOnUsers
  4. Set Value data = 1
  5. Restart the computer to apply changes

Summary

Method Best for
Task Scheduler Recurring automatic restarts
Command Prompt One-time scheduled restart
Group Policy Editor Network-wide restart control
Registry Editor Preventing restarts after updates

Chat Support

We're here to help

Available Mon–Sun, 08:00–22:00 WIB