Creating and Managing Server Schedules
Running a smooth Minecraft server shouldn't take up all your time. With our built-in Schedules feature, you can run server reboots, and in-game announcements automatically, on a set timeframe.
Overview
The Schedules feature enables you to automate tasks on a set schedule. A single schedule can contain one or multiple consecutive Tasks, such as:
- Restarting the Server to clear RAM and prevent performance degradation
- Broadcasting Warnings or Messages to players before a scheduled reboot
- Executing Console Commands (e.g., saving the world via
save-allor clearing lag)
Creating a New Schedule
- Log into BaoHost and select your Minecraft server.
- In the left sidebar under the MANAGEMENT section, click on Schedules.
- Click the Create Schedule button in the top right.
Schedule Settings Breakdown:
- Schedule Name: Give your schedule a recognizable title (e.g.,
Daily Automated Backupor6-Hour Server Restart). - Cron Expression (Time Interval): Set when the schedule should trigger using the 5 cron fields (Minute, Hour, Day of Month, Month, Day of Week).
- As you type, the panel displays a human-readable summary directly below the input boxes (e.g.,
Every 5 minutes, every hour, every day). - Click the Crontab Guru button inside the menu to open an online editor if you need help designing custom time intervals.
- As you type, the panel displays a human-readable summary directly below the input boxes (e.g.,
- Timezone Information: Pay attention to the timezone alert box. Times run based on the Server Timezone, which may differ from your local timezone.
- Only When Server Is Online: Toggle this ON if the task should only run while the server is active (recommended for backups and in-game commands).
- Schedule Enabled: Toggle this ON so the schedule executes automatically on your set timeline.
- Click Create schedule to save your schedule settings.
Useful Cron Expression Examples
| Schedule Goal | Cron Expression | Fields (Min Hour Dom Mon Dow) |
| :--- | :--- | :--- |
| Every Day at 3:00 AM | 0 3 * * * | 0 3 * * * |
| Every 6 Hours | 0 */6 * * * | 0 */6 * * * |
| Every 12 Hours | 0 */12 * * * | 0 */12 * * * |
| Every Sunday at Midnight | 0 0 * * 0 | 0 0 * * 0 |
| Every 30 Minutes | */30 * * * * | */30 * * * |
Adding Tasks to Your Schedule
After creating a schedule, add one or more Tasks to specify what the server should do when the schedule runs.
-
From the Schedules page, click on the schedule you just created.
-
Click the New Task button.
-
Configure the task details:
- Action: Choose what action to execute:
- Send Command: Executes a command in the server console.
- Power Action: Triggers
Start,Restart,Stop, orTerminate.
- Payload:
- If Send Command is selected: Enter the exact console command to run (e.g.,
say Server restarting in 5 minutes!).
- If Send Command is selected: Enter the exact console command to run (e.g.,
- Time Offset (Seconds): Set a delay before this specific task runs after the schedule triggers.
- Action: Choose what action to execute:
-
Click Save Changes.
Example: Setting Up an Automated Restart with Player Warning
This is a simple example on how to restart your server automatically every 12 hours while warning players in advance:
- Create a schedule named 12-Hour Automatic Restart.
- Set the cron expression to
0 */12 * * *. - Click into the schedule and create a new Task:
- Action:
Send Command - Payload:
say [Server] Scheduled restart in 5 minutes! Save your progress! - Time Offset:
0seconds
- Action:
- Create another task by clicking on New Task:
- Action:
Send Command - Payload:
save-all - Time Offset:
240seconds (runs 4 minutes after Task 1)
- Action:
- Create another task by clicking on New Task:
- Action:
Power Action-> Restart - Time Offset:
300seconds (runs 5 minutes after Task 1)
- Action:
Best Practices for Schedules
- Avoid Heavy Tasks: Avoid running heavy world saves simultaneously across multiple schedules.
- Respect Server Timezones: Double-check the Server Timezone shown in the schedule panel to make sure reboots don't happen during peak playing hours.
- Test Schedules Manually: You can click the Run Now button inside any schedule to trigger it immediately and test if your tasks run correctly.