txadminrestartsmaintenance8 min read · updated 9/11/2026

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.

FiveM Scheduled Restarts with txAdmin: Times, Warnings and Saving Data

#Setting the schedule

  1. Open txAdmin → Settings → Restarter.
  2. Add restart times in 24-hour format, for example 06:00, 14:00, 22:00.
  3. Save. The next restart time appears on the dashboard.

#Saving data before the restart

server.lua
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?
Settings → Restarter, add times in 24-hour HH:MM format and save.
When does txAdmin warn players about a restart?
30, 15, 10, 5, 4, 3, 2 and 1 minutes before a scheduled restart.
How do I save player data before a restart?
Handle txAdmin:events:scheduledRestart (for example at 60 seconds remaining) and txAdmin:events:serverShuttingDown.
How often should a FiveM server restart?
Commonly every 6–8 hours, at quiet times.

Ready to pick a map?

Twelve themes on three base map styles, $8 each, instant download.