🕛 Adding Task Scheduling to Your Minecraft Server
- PixelHost
- 16 ago 2024
- 3 Min. de lectura
Actualizado: 27 ago 2024
Hello, PixelHost Community! 🎮🌟
In this guide, we want to help you make the most of our control panel at PixelHost by teaching you how to schedule tasks for your servers. Automating these tasks will allow you to manage your Minecraft server more efficiently and without hassle. 💡
📝 What Are Scheduled Tasks?
Scheduled tasks are actions that you can set to run automatically on your server. They can be as simple as sending a reminder message to your players, performing backups, or restarting the server. Forget about always being on top of things—let automation do the work for you! 🤖
📅 Accessing Scheduled Tasks
To access scheduled tasks:
Go to the left menu on your server's details page.
Select "Scheduled Tasks."
Here, you can create a new schedule. 🆕
A window will open where you can:
Name the schedule. 📝
Specify the Minute, Hour, Day of the Month, Month, and Day of the Week when the schedule will start. 🕛
🛠️ Adding Tasks to Your Schedule
Once you’re in the Scheduled Tasks section, it’s time to add some tasks to your schedule. 🛠️
✨ Creating a New Task
Create a New Task: Click the "New Task" button. A window will open where you can choose the type of task to create. 🚀
Types of Tasks:
Send Command: Allows you to write a command to be executed in the "Payload" window. 💻
Send Power Action: This option lets you schedule actions like starting, stopping, or restarting the server. 🔌
🧭 Step-by-Step for Creating a Scheduled Task
Create an Action: For this example, we’ll use the "Send Power Action" option, which allows us to choose between starting, stopping, or restarting our server. 🔄
Delay: Enter the amount of time to wait after the previous task executes before executing the current one. ⏳ (Since this is the first task, this section won’t apply here.)
Payload: Here, you specify the action the task will perform. ⚙️
Continue on Failure: As indicated, future tasks will run even if this task fails. ❗
Ready? Click the "Create Task" button. ✅
⏩ Running Your Task Immediately
Once the task is created, a button will be enabled to run the schedule immediately, in case you don’t want to wait until the date/time you set. 🕓
➕ Adding More Tasks
As we’ve seen, you can add more tasks to your schedule. For example, you can add a task to send a command to give "OP" to a user. 🛡️
(Remember to write the command without the "/")
✅ Testing the Schedule
Let’s test if our schedule works correctly by clicking the "Run Now" button. 🎯
As seen in the image below, the schedule executed successfully: first, it started the server, and then it gave OP to the selected user, as shown in the console. 👨💻
🎉 All Set!
You’re now ready to create your own schedules for your server. 🎮
⚙️ More Functions
You can add multiple tasks to your schedule. For example, you could add a task to "Stop the Server" afterward. 🛑
🏁 Conclusion
Now you know how to schedule tasks on your server. Remember to set the correct day/month/time for when you want the tasks to execute. Feel free to explore the "Schedules" section to see the multiple tasks available and choose the ones that best suit your needs. 🔍
We hope this guide has been helpful, and remember, don’t hesitate to ask in the PixelHost Discord or contact our support team.Follow us on Twitter (@PixelProHosting) to stay up to date
Best regards!! 👋
João @PixelHost.
Comments