What is a task?
A task is a single action a schedule performs when it fires. The schedule decides when; the tasks decide what. A schedule with no tasks is just a timer that does nothing, so this page is where the actual work gets defined. You can give one schedule several tasks, and they run one after another in the order shown, which is what turns a bare "midnight" trigger into a full routine.
The three things a task can do
Every task is one of three actions, chosen when you add it. Between them they cover almost anything you would want a server to do on its own.
| Action | What it does |
|---|---|
| Send Command | Runs any command you could type in the console, for example say Restarting soon, save-all, or a plugin command |
| Send Power Action | Starts, restarts, stops, or kills the server |
| Create Backup | Takes a full backup snapshot, exactly like doing it by hand, but automatically |
The power action has four options and the difference between the last two matters. Start, restart, and stop are the clean, graceful ones that let the server shut down properly. Kill is the emergency option: it force-terminates the server instantly, without saving.
Only schedule a kill if you know you need it. Because it does not let the server save first, using it on a healthy server can corrupt the world. Reach for stop or restart for normal routines, and keep kill for a server that has genuinely frozen.
Chaining tasks with a time offset
When a schedule has more than one task, they do not all fire at once. Each task after the first has a time offset, measured in seconds, which is how long to wait after the previous task begins before this one runs. That single number is what lets you build a countdown instead of a pile-up. Warn players, wait four minutes, warn again, wait one more, then restart, all spaced out by the offsets you set.
Continue on failure
By default, if a task fails, the schedule stops and the remaining tasks do not run, which is usually the safe choice. Each task also has a "continue on failure" switch. Turn it on when a later step should happen no matter what: for instance, you almost always want the restart at the end of a routine to fire even if an earlier announcement command errored out.
A restart routine, start to finish
Here is what a well-behaved nightly restart looks like once it is broken into tasks. The schedule fires at midnight, and these run in order:
- Send command
say Server restarting in 5 minutes, offset 0, so it fires the moment the schedule starts - Create backup, offset 0, kicking off right away so it has the full five minutes to finish
- Send command
say Restarting in 1 minute, please find a safe spot, offset 240, four minutes after the backup began - Send power action: restart, offset 60, one minute after that final warning
That is the whole idea. Small, ordered steps, spaced by their offsets, add up to a routine that warns your players, protects your world, and keeps the server fresh, every single night, without you lifting a finger.