GuideUpdated 27 November 20268 min read

How Windows Server decides when to install updates and restart, how to move both to the weekend, and what to check in MT4 and MT5 after the restart.

In short
  • Windows Server installs updates and restarts according to its Automatic Updates setting. Active hours do not protect a trading week: Windows Server 2016 allows at most 12 of them, later versions 18.
  • On a trading VPS, set Windows to notify you (Configure Automatic Updates option 7, Windows Server 2016 and later) and install by hand at the weekend, or schedule the install for Saturday (option 4).
  • Microsoft publishes its monthly security update on the second Tuesday of each month, so the weekend after it is a natural moment to install.
  • Before the restart, close each terminal with File, Exit. After it, check the uptime, the restart event in Event Viewer and every terminal: connected, AutoTrading on, EAs on their charts.
  • Microsoft counts only active Remote Desktop sessions as signed-in users. Closing the Remote Desktop window keeps MetaTrader running, but Windows Update no longer sees you as signed in.

Windows Server installs updates and restarts when its Automatic Updates setting tells it to, and on many machines that means a restart at a time you did not choose. On a trading VPS you take that choice back in two ways: let Windows only notify you and install by hand at the weekend, or schedule the install for Saturday. Active hours cannot cover a trading week. After the restart you check that each terminal came back, connected and trading.

Set Windows to notify or to install on Saturday, wait for the weekend, install and restart, then check the terminals
Updates on a trading VPS: your schedule, not Windows' schedule.

How Windows Server decides when to install and restart

Two places hold the setting. Group Policy, under Computer Configuration, Administrative Templates, Windows Components, Windows Update, Configure Automatic Updates, wins when it is set. When it is not, the choice made in the Windows Update settings or in SConfig applies. Microsoft documents these modes (Group Policy options, SConfig settings):

ModeWhat Windows doesRisk on a trading VPS
SConfig AutomaticChecks for and installs updates every day at 3:00 AM, by the VPS's own clock and time zoneHigh: from Monday to Friday, 3:00 AM falls inside the trading week
SConfig Download only (Microsoft's default for that tool)Downloads updates and notifies you in the Action centerLow, but the notice is visible only while you are signed in, so updates wait until you look
SConfig ManualDoes not check for updates by itselfNone, and no security updates unless you install them
Policy option 2 or 3Notifies before download (2) or after download (3); you install from SettingsLow
Policy option 4Downloads and installs on the day and hour you set, then restartsPlanned: you choose the day
Policy option 7 (Windows Server 2016 and later)Downloads, notifies you to install, then notifies you to restartLow: Microsoft recommends it for servers

Why active hours do not protect a trading week

Active hours tell Windows when not to restart. Microsoft's defaults are 8 AM to 5 PM, and the longest window is 12 hours on Windows Server 2016 and 18 hours on later versions. The forex market is open around the clock from Sunday evening to Friday evening, so at least 6 hours of every trading day stay open to a restart.

Two other settings look like protection and are not:

  • Staying connected. For Remote Desktop, Microsoft counts only active sessions as signed-in users. Closing the Remote Desktop window leaves MetaTrader running, but Windows Update no longer sees you as signed in.
  • No auto-restart with logged on users. Microsoft writes that this policy "doesn't work exactly as per description" and recommends option 7 for servers instead.

Pick the time: the weekend after Patch Tuesday

Microsoft publishes its monthly security update on the second Tuesday of each month, typically at 10:00 AM Pacific Time. Out-of-band fixes come outside that schedule when Microsoft needs them. For a trading VPS this gives a simple rhythm: install once a month, on the first weekend after the second Tuesday.

Choose the hour by the market, not by the clock on the wall:

  • The window runs from your broker's Friday close to its Sunday open. Saturday sits in the middle of it.
  • If you trade symbols that are open at the weekend, such as crypto CFDs at some brokers, check their trading hours in MetaTrader before you choose.
  • Scheduled times use the VPS clock. Check its time zone in the Date and time settings before you enter an hour.

See how your VPS is set up now

  1. Connect with Remote Desktop.
  2. Open Settings, then Update & security, then Windows Update. The page shows pending updates and a restart that may already be scheduled.
  3. To read the policy, press the Windows key and R, type gpedit.msc, and go to Computer Configuration, Administrative Templates, Windows Components, Windows Update (if the policy is not listed there, look in the subfolders of Windows Update). Open Configure Automatic Updates and read whether it is Not Configured, Disabled or Enabled, and with which option.
  4. Alternatively, open PowerShell, type SConfig and press Enter. The main screen shows the current update setting.

If a restart is already scheduled in the middle of the week, install and restart now during a quiet moment, or at least before the time shown.

Option A: be notified, then install by hand at the weekend

This is the setting with the fewest surprises.

  1. In gpedit.msc, open Configure Automatic Updates, choose Enabled, and in the options pick 7 - Notify for install and notify for restart. Click OK.
  2. Open a Command Prompt and run gpupdate /force so the change applies straight away.
  3. Put a reminder in your calendar for the weekend after the second Tuesday of each month.

On that weekend:

  1. Check that no EA is in the middle of something you would not want interrupted. Open positions stay on the broker's server during the restart (see the table below), but the EAs stop until the terminals are back.
  2. Write down what should be running: terminals, accounts, EAs and charts.
  3. Open Settings, Update & security, Windows Update, and choose Check for updates. Install what is offered. Or, in PowerShell, run SConfig, choose 6, then 1 for all quality updates, then A to install them.
  4. When Windows asks for a restart, first close each terminal with File, Exit, so it saves its charts and settings. Then restart.
  5. Some updates keep Windows on an updating screen for a while during the restart. Let it finish: do not stop the VPS from outside while it works.
  6. Wait a few minutes before you reconnect, then run the checks further down.

Option B: schedule the install for Saturday

Use this if you do not want to install by hand. The VPS will restart on its own at the hour you set, so the terminals must start again without you.

  1. In gpedit.msc, open Configure Automatic Updates, choose Enabled and pick 4 - Auto download and schedule the install.
  2. Set the scheduled install day to Saturday and the hour you chose by the VPS clock. In Microsoft's settings the days run from Sunday (1) to Saturday (7), and 0 means every day: do not leave it on every day.
  3. Click OK and run gpupdate /force.
  4. Make sure the terminals start again by themselves after a reboot. Microsoft states that this option forces a restart after the scheduled install, so the autostart has to work without you.

The weak point of this option: nobody closes the terminals before the restart, so changes you made since the last save can be lost. Keep each terminal's profile saved (File, Profiles) so that the charts and EAs come back as you left them.

What stops and what keeps working during the restart

ItemWhere it livesDuring the restart
Open positionsBroker's serverStay open
Stop Loss and Take ProfitBroker's serverKeep working
Pending ordersBroker's serverKeep working
Trailing stop of MT4 or MT5The terminalStops: it works in the terminal, not on the server (MT4 help, MT5 help); the last Stop Loss it set stays
The EA, and stops or targets it manages itselfThe terminalStop until the terminal is running again

If your EA keeps its stops hidden instead of sending them to the broker, those stops do nothing until the terminal is running again. Ask the vendor how the EA behaves after a restart.

What to check after the restart

  1. Did it restart when you expected? Open Task Manager on the VPS, Performance, CPU, and read Up time.
  2. Was it the update? Open Event Viewer (type eventvwr in the Start menu), Windows Logs, System, and filter for event ID 1074. Microsoft describes it as the event logged when an application or a user restarted the machine. A 41 or 6008 at that time means the shutdown was not clean.
  3. What was installed? The update history on the Windows Update page lists the updates. In PowerShell, (Get-HotFix | Sort-Object -Property InstalledOn)[-1] shows the most recent one and its date. Get-HotFix does not list every kind of update, so the history page is the fuller list.
  4. Is each terminal back? Every terminal on your list is open, the connection indicator in the bottom-right corner is active, and the Journal tab shows a start time from before you connected.
  5. Are the EAs trading? AutoTrading (Algo Trading in MT5) is on, each EA is on its chart with its status icon, and the Experts tab shows no errors.
  6. Do the trades match? Compare open positions and pending orders with what you wrote down.
  7. Leave by closing the Remote Desktop window, not by signing out.

If a terminal is missing or idle, start with MT4 not starting after a VPS reboot. If the EAs are back but do not trade, see EA stopped after the weekend.

When this is not the right approach

How this works on Dipgate

  • A Trading VPS runs Windows Server 2022, 2019 or 2016, so the settings on this page apply to it. Autologin is set up on the VPS; move each platform's shortcut into the My Platforms Autostart folder so the terminals start after the restart. If you change the VPS password, redo the autologin.
  • Dipgate's knowledge base has an article on installing Windows updates on a Dipgate VPS, and its resource-monitoring article suggests a weekend reboot. The video below was recorded on a Trading VPS (Windows):
How to install Windows updates in a Dipgate VPS
Video: How to install Windows updates in a Dipgate VPS
  • From the client area you can start and stop a Trading VPS, and it has a VNC Console and Backups panel. A VNC console shows the VPS screen without Remote Desktop, which helps when Remote Desktop cannot connect during a long update.
  • Metatrader VPS runs Ubuntu, not Windows, so this page does not apply to it.

More on the Trading VPS page.

FAQ

Can I just turn Windows Update off on my VPS?

You can set it to manual, but then nothing installs unless you do it, including security fixes for a machine that is reachable from the internet. Installing by hand once a month at the weekend keeps the control without leaving the VPS unpatched.

Will Windows Update close my MT4 without warning?

When Windows restarts it closes the programs that are running, MetaTrader included. Whether that restart comes during the week depends on the update settings, which is why this page moves it to the weekend.

Do my open trades close when the VPS restarts for updates?

No. Open positions, their Stop Loss and Take Profit, and pending orders stay on the broker's server. What stops is the EA, and in MT4 and MT5 the trailing stop, which works in the terminal and not on the server.

The update has been on the restart screen for a long time. Should I force a restart?

Give it time first: interrupting Windows while it installs updates can leave the system damaged. If the screen has not changed for a long time, ask your provider before you stop the VPS.

How do I know which update was installed last?

Open the update history on the Windows Update page, or run (Get-HotFix | Sort-Object -Property InstalledOn)[-1] in PowerShell, which shows the most recent update and its date.