Plex Host Docs

Automations

Automations run actions on your server for you: a nightly restart, a shutdown when nobody is playing, or a stop after the server keeps crashing.

How Automations Work

Each automation is a rule. A rule has:

  1. One trigger - what starts it (a schedule, an idle timer, repeated crashes, or you)
  2. Ordered steps - what it does, from top to bottom

When the trigger fires, the steps run in order. Each run is recorded in the run history.

Finding Automations

  1. Open your server from the server list
  2. Click Automations in the server navigation

Members who can control the server can see and manage its rules. Rules run with the access of the person who created them, so a rule stops working if that person loses the access it needs.

Templates

When you create a rule, Start from offers four starting points. You can change any field afterwards.

TemplateWhat it does
Nightly restartWarns players, waits for the server to empty, backs up, then restarts
Stop when emptyStops the server after 30 minutes with nobody online
Crash guardStops the server after 3 crashes in 10 minutes and notifies you
Weekly backupBacks up the server on Mondays, once it is empty

You can also start from scratch and pick a trigger and steps yourself.

Triggers

When sets what starts the rule.

TriggerOptions
On a scheduleEvery hour, every 6 hours, every day at 04:00, every Monday at 05:00, or a custom cron expression
When nobody is onlineRuns once the server has been empty for a number of minutes (5 to 1440)
After repeated crashesRuns after a number of crashes (1 to 20) within a number of minutes (1 to 60)
Only when I run itRuns only when you choose Run now from the rule's menu

Notes on the schedule:

  • Times are in UTC.
  • A custom cron expression has five fields: minute, hour, day, month, weekday. A rule can run at most once every 5 minutes.
  • The idle clock starts when the last player leaves. A restart resets it.
  • A stop that you start yourself does not count as a crash.

What "Waits Until the Server Is Empty" Means

The Wait until the server is empty step holds the run until no players are online. You set a maximum wait (1 to 720 minutes) and what happens if the server never empties:

  • Continue anyway - the run goes on to the next step.
  • Stop the run - the run ends and the remaining steps do not run.

Steps

Add up to 10 steps per rule. Use the arrows to reorder them.

StepWhat it does
Warn playersSends a message to players, with a countdown. The message can use {minutes} for the minutes left. You choose when to repeat the warning, for example at 10, 5 and 1 minutes left.
Wait until the server is emptyWaits for no players, up to the maximum wait (see above)
Create a backupCreates a backup with the name you give it
Stop / restart the serverStart, stop, restart, or kill (force stop) the server
Run a console commandSends one command to the server console, without a leading slash
Notify meSends a message through your notification channels

Run History

The Run history section lists the latest runs for the server. Open a run to see each step in order.

Run statuses:

StatusMeaning
RunningThe run is in progress
QueuedThe run is waiting to start
SucceededEvery step finished
FailedA step failed; the run records why
StoppedThe run was ended early, for example because a wait timed out with Stop the run, the rule was turned off, or it was edited during the run

Step statuses are Waiting, Running, Done, Failed and Skipped. A step is skipped when the run ended before reaching it, or when the step could not run, such as a warning sent while the server is offline.

Only one run happens at a time per server. A new run never interrupts one that is already in progress.

Idle rules and the Wait until the server is empty step need the game to report who is online. This works for Minecraft Java Edition, Minecraft Bedrock Edition and Palworld. For other games the When nobody is online trigger is disabled, and an idle rule shows Won't run: this game can't report who is online. Schedules, crash rules and manual runs still work.

A rule runs with the access of the person who created it. If that person is removed from the team or loses a permission a step needs (for example, creating backups), the rule can fail. Edit the rule and save it again as someone who has that access.

Troubleshooting

  • The rule never runs - Check that the rule is turned on and that the server is online. A disabled rule does not run, even on a schedule.
  • The idle trigger is disabled - The game does not report who is online. Use a schedule or a manual run instead.
  • A step shows Skipped - The run ended before reaching that step, or the server was offline when a warning was due. Open the run in the run history to see which step stopped it.
  • A run shows Stopped after a wait - The server did not empty in time and the wait was set to Stop the run. Increase the maximum wait or choose Continue anyway.
  • A schedule did not fire when you expected - Remember that times are UTC.

On this page