Scheduled restarts on a FiveM server
Most roleplay servers restart two to four times a day. It clears leaked entities and memory, applies updated resources and gives the database a quiet moment. txAdmin does the scheduling, warns players and tells your scripts to save before the server goes down.
Short answer: In txAdmin’s settings, add restart times (24-hour HH:MM). txAdmin broadcasts txAdmin:events:scheduledRestart 30, 15, 10, 5, 4, 3, 2 and 1 minutes before, with secondsRemaining, and txAdmin:events:serverShuttingDown right before stopping. Save player data in those handlers. Admins can skip the next restart from the dashboard; crashes are restarted automatically.

#Setting the schedule
- Open txAdmin → Settings → Restarter.
- Add restart times in 24-hour format, for example
06:00,14:00,22:00. - Save. The next restart time appears on the dashboard.
#Saving data before the restart
AddEventHandler('txAdmin:events:scheduledRestart', function(data)
if data.secondsRemaining == 60 then
-- one minute left: save everything
SaveAllPlayers()
end
end)
AddEventHandler('txAdmin:events:serverShuttingDown', function(data)
-- data.delay = ms before txAdmin kills the process
SaveAllPlayers()
end)SaveAllPlayers stands for your framework’s save function. serverShuttingDown fires for every stop or restart — scheduled, by an admin, or by the system — so it is the safest single place to save.
#Skipping and temporary restarts
From the dashboard an admin can skip the next scheduled restart (for an event running late) or schedule a one-off restart. Skips broadcast txAdmin:events:scheduledRestartSkipped, so a countdown UI can hide itself.
#Crash recovery
txAdmin monitors the server and restarts it when it crashes or stops responding. If it restarts often, read the console and crash logs instead of relying on it — see txAdmin setup.
#How often is right?
Every 6–8 hours suits most servers. If performance falls apart between restarts, a resource is leaking entities or memory: profile it rather than restarting more often — see server performance and entity limits.
Questions
How do I schedule restarts in txAdmin?
HH:MM format and save.When does txAdmin warn players about a restart?
How do I save player data before a restart?
txAdmin:events:scheduledRestart (for example at 60 seconds remaining) and txAdmin:events:serverShuttingDown.How often should a FiveM server restart?
Ready to pick a map?
Twelve themes on three base map styles, $8 each, instant download.