Schedules and triggers
Make your server act on its own, either at a set time or in response to what it prints.
A schedule runs at a time you choose. A trigger runs when a line of console output matches a pattern.
Schedules
Feature
The Schedules tab appears only when the schedules feature is on. Your administrator can also turn schedules off for the whole panel.
Use a schedule for work that happens on a clock. Common examples are a nightly restart, a warning message before that restart, and a backup every six hours.
The schedules list
Under the heading, the panel shows how many schedules you use and how many you are allowed, for example 2 of 5 schedules used. New Schedule is greyed out when you reach the limit. Delete a schedule to make room.
Each schedule is one card. The card shows:
| Item | Meaning |
|---|---|
| Switch on the left | Turns the schedule on or off. An off schedule keeps its tasks but does not run. |
| Name and timing | The name that you gave it, and the timing written in plain words. |
| Clock badge | The time until the next run, for example in 2h 5m. |
| Running badge | The schedule is running its tasks now. |
| Chevron | Opens the task list. |
| Three-dot menu | Run Now, Edit, and Delete. |
| Blue badge | Appears when the schedule runs only while the server is online. |
Run Now starts the schedule at once. The timing does not apply.
Delete asks first. The schedule and all of its tasks are removed, and it does not run again.
Creating a schedule
- Click New Schedule.
- Type a name in the Name field, for example
Daily restart. - Set the timing in the Schedule (Cron) field. The panel writes the timing in plain words under the field.
- To start the schedule now, set Schedule is active.
- If the tasks need a running server, set Only run when server is online.
- Add at least one task. See below.
- Click Create Schedule.
A schedule needs a name and one task. The panel refuses to save without them.
Timing
The timing field takes a cron expression with five parts, separated by spaces:
minute hour day-of-month month day-of-weekSix preset buttons sit under the field. Click one to fill in the field:
| Preset | Expression |
|---|---|
| Every 5 minutes | */5 * * * * |
| Every 15 minutes | */15 * * * * |
| Every 30 minutes | */30 * * * * |
| Every hour | 0 * * * * |
| Every 6 hours | 0 */6 * * * |
| Every 12 hours | 0 */12 * * * |
You can also type your own expression. For example, 30 4 * * * runs at 04:30 every day.
WARNING
Times use the clock of the panel server, not the clock of your computer. If you are in a different time zone, a schedule runs at a different local time than you expect.
Tasks
Click Add Task for each step. Tasks run in the order that they appear.
| Task type | What it does |
|---|---|
| Send Command | Sends a line to the server console, for example say Restart in 5 minutes. |
| Power Action | Starts, stops, restarts, or kills the server. |
| Create Backup | Takes a backup of the server. |
Each task has a Delay in seconds. The delay is the wait before that task runs. A delay of 0 runs the task at once.
A common pattern for a nightly restart uses four tasks:
- Send Command
say Server restarts in 5 minutes, delay 0. - Send Command
say Server restarts in 1 minute, delay 240. - Send Command
say Restarting now, delay 60. - Power Action
Restart, delay 5.
Use the bin icon on a task to remove it.
Only run when server is online
If this option is set and the server is not running at the scheduled time, the panel skips the whole run. Nothing happens, and the schedule waits for the next scheduled time.
Turn the option off for a schedule that must start the server.
When a task fails
If a task fails, the panel stops that run. The tasks after the failed task do not run.
The schedule stays on. It runs again at the next scheduled time.
The card reports the failure. It marks the last run as failed and gives the reason. Open the task list on the card to see which task stopped the run. The mark stays until the next run succeeds.
Permissions for other users
| Permission | Allows |
|---|---|
| View | See the schedules and their tasks. |
| Create | Add new schedules. |
| Update | Edit existing schedules and turn them on or off. |
| Delete | Delete schedules. |
Triggers
The Triggers tab watches the console output of the server. When a line matches your pattern, the trigger runs one or more actions.
Availability
The Triggers tab appears only for games where the panel knows how to read the console output.
Use a trigger for work that depends on what the server says, not on the clock:
- Restart the server when a known crash message appears.
- Welcome a player by name when they join.
- Send a webhook to your chat when a critical error appears.
- Kick a player who types a banned phrase.
The triggers list
The table shows one row per trigger:
| Column | Content |
|---|---|
| Name | The name that you gave it. Disabled triggers say (disabled). |
| Pattern | The text pattern that the trigger looks for. |
| Actions | The action types on this trigger. |
| Fired | How many times the trigger has run. |
Each row has an Edit link and a Delete link.
Egg defaults
Click Install egg defaults to add the triggers that ship with the game template. The panel skips any trigger that you already have. Some templates ship none, and the panel tells you so.
This is a good starting point. Install the defaults first, then edit them.
Creating a trigger
- Click New trigger.
- Type a Name, for example
restart-on-crash. - Type a Regex pattern. This is the text pattern that the trigger looks for in each console line.
- If the pattern can match many times in a row, set Throttle (ms). See below.
- Leave Enabled ticked.
- Pick an action type and fill in its field. Click Add action for more actions.
- Click Save.
A trigger needs a name, a pattern, and at least one action.
The match
The pattern is a regular expression. The panel tests it against every line that the server prints.
A named group in the pattern captures part of the line. Write a group as (?P<name>...). You can then use $name in an action.
For example, this pattern captures the player name from a join message:
^(?P<player>\S+) connected fromAn RCON action of say Welcome $player then greets the player by name.
WARNING
A pattern that matches too much fires too often. Test a new trigger with a harmless action, such as Notify, before you point it at a restart.
Throttle
The throttle is a wait in milliseconds. After the trigger fires, it ignores further matches until that time passes.
Set a throttle when a crash writes the same line many times. A throttle of 60000 limits the trigger to one run per minute. Leave it at 0 for a pattern that matches rarely.
The action
Pick an action type from the dropdown. The field next to it changes with the type:
| Action | Field | What it does |
|---|---|---|
| RCON command | The command | Sends the command to the running server. |
| Restart | None | Restarts the server. |
| Stop | None | Stops the server. |
| Kill | None | Stops the server process at once. |
| Webhook | A URL | Sends a request to that URL. |
| Notify | A message | Sends a notification in the panel. |
One trigger can hold several actions. They run in the order that you list them. Use the bin icon to remove an action.
Which one to use
| Goal | Use |
|---|---|
| Restart at 04:00 every day | A schedule |
| Restart when the log says the world failed to save | A trigger |
| Back up every six hours | A schedule |
| Alert your chat when a plugin errors | A trigger |
| Warn players before a planned restart | A schedule |
Next steps
- Backups to back up on a timetable
- Console to read the output a trigger watches
- Server users to let somebody else manage your schedules
