Back up every night when empty
Back up the server at 04:00, but only on nights when no player is online.
- Duration
- ~5 min
- Requirements
- A server · An open Konnekt
- Topics
- Scheduler · Backups
Before you start
- Konnekt left open overnightGraphs run only while Konnekt is open.
- The scheduler editorMaximize the Scheduler tile to open it.
Add the trigger
Open the editor and select Open blocks, then Cron Schedule.
| Field | Set to |
|---|---|
| Cron expression | 0 4 * * * |
This fires at 04:00 every day by this computer's clock.
Change the second number to change the hour.
The other forms are on the cron page.
Check that nobody is online
Add Condition and Read Attribute.
| Block | Field | Set to |
|---|---|---|
| Read Attribute | Attribute | players.count |
| Condition | Operator | == |
| Condition | B | 0 |
- Drag from onComplete on Cron Schedule to trigger on Condition.
- Drag from Value on Read Attribute to A on Condition.
Read Attribute has no control ports.
It reads the player count when Condition runs.
Condition leaves by onTrue when the count is 0, and by
onFalse otherwise.
Nothing is wired to onFalse, so a night with players online ends the run with
no backup.
Add the backup
Add Create Backup.
Leave Target at Full server, or pick Active world to zip only
the world.
Drag from onTrue on Condition to trigger on
Create Backup.
Switch it on
- Select Graph actions, then Save.
- Select run to test it.
- Select [off] so it reads [on].
run starts the graph at once, so with nobody online it makes a real
backup.
A new graph starts off, and nothing fires until it is on.