Hi Creators,
The ServerRestartScheduled event is now also invoked for server restarts scheduled for Roblox infrastructure maintenance. We know how frustrating it is for players to suddenly lose their progress in games for reasons outside of your control.
Now, when Roblox needs to shutdown servers, the game server will fire the ServerRestartScheduled event, using the same API that we introduced for Creator initiated restarts. Before the server closes, you can prompt players to save their progress, teleport them to new servers, or run any other custom logic.
The ServerRestartScheduled event arguments remain the same as before, but the fields will be populated differently for server maintenance restarts:
| Argument | Type | Description |
|---|---|---|
RestartTime |
DateTime | The earliest time the external shutdown is scheduled to occur. This will usually be scheduled for 30 minutes after the server receives the notification |
Source |
Enum.CloseReason | For server maintenance restarts, this will always be RobloxMaintenance. |
Attributes |
Dictionary | This will be an empty dictionary for Roblox initiated restarts. |
How to Get Started:
To hook up your game to server maintenance restart notifications, attach a callback to game.ServerRestartScheduled inside a server side script. You can hook into both the RobloxMaintenance and DeveloperUpdate sources in the same callback.
game.ServerRestartScheduled:Connect(function(restartTime, source, attributes)
if source == Enum.CloseReason.RobloxMaintenance then
if roundEndTime < restartTime then
-- Teleporting players to the place will take them to a stable server.
teleportAfterCurrentRound = true
else
notifyPlayers("Please save your game before", restartTime)
end
elseif source == Enum.CloseReason.DeveloperUpdate then
local msg = attributes and attributes.message or ""
notifyPlayers(msg, restartTime)
end
end)
Now, whenever a server restarts, it will receive the notification and run your callback immediately. You can respond to server maintenance restarts and developer game updates in different ways, customizing what you show in the UI accordingly.
Please let us know if you have any feedback about this change.
Roblox Creator Services Team
FAQs
Why do these server maintenance restarts need to happen?
- Game servers require periodic maintenance for events like OS patching and rack upgrades. These actions help keep the platform secure and safe.
How often do these maintenance restarts occur?
- We try to minimize these server maintenance restarts as much as possible, but they do occur at a regular cadence. Properly handling the notification will allow restarts to be entirely invisible to players of most games.
Will servers receive notifications for all server maintenance restarts?
- Servers will receive notifications for all scheduled maintenance restarts, but there are occasional restarts for emergency maintenance that do not send notifications to servers.
Why is the notification window before the restart only 30 minutes?
- Restarts performed for maintenance reasons have varying levels of urgency and some may need to happen as soon as 30 minutes into the future. However, scheduling for these restarts is unpredictable and can happen minutes to hours after the provided time. You can leave the players in the server for longer than the provided
RestartTime, but you do so at your own risk as the server may shut down at any time. YourDataModel:BindToClosecall backs will still be run before the server shuts down.
Will teleporting my players out of the server take them to a server without a maintenance restart scheduled?
- Yes, if you use
TeleportService:TeleportAsyncto teleport players to the place, the players will be placed into a server without an impending restart. However, if you teleport players to a specific instance that is scheduled for a maintenance or developer update restart, then they may be force migrated to a new server when the server shutdown occurs.