Add Scheduled Tasks To Your Minecraft Server
Last modified on Apr 3, 2023 in control panel
By ApexHosting
Overview
Our control panel at Apex makes it easy to automate commands for your servers using scheduled tasks. Scheduling tasks allow you to automate a great number of server management actions like backing up, restarting, or broadcasting messages by utilizing commands.
To access your tasks you need to navigate to the left side menu under the server details page and select Scheduled Tasks. You will then be directed to the task list with several tasks already issued for your server (backup, restart, and restart warning).
To create a new task, navigate over to the left side menu once more and select New Task.
Creating a Scheduled Task
On this page, you will find all fields you can alter to create your scheduled tasks. Anything marked with an Asterisk (*) will be a required field. In the following example, we will set up a task to announce to our server that they need to remember to vote. We will run this task every 24 hours.
Name*
Start off by giving your task a name. In most cases it’s convenient to name it with the action it will perform. Here we have just set the name to “Vote Reminder.”
Status
Next, you will want to set your task’s status. The status field will need to be set to either “Scheduled” or “Paused.” Scheduled would indicate that the task is set to run at the next Scheduled Time. Paused will mean that the task is not currently set to run.
Scheduled Time*
Then you will need to set up when it will first run by clicking the Scheduled Time input to access the calendar and time selector. The time will be in the panel’s timezone which is currently UTC. You can check the current time in UTC at the top right of the page. If you would like to convert this to your local time zone we recommend using this time zone converter. Be sure to set the time to something in the future to ensure the task runs.
Interval
You can then set the task to run at an interval after the initial Scheduled Time, otherwise, it will only run once. In our example below, we have enabled intervals and set it to run one time per day.
Command*
This defines what Command will be executed at the respective scheduled time and set interval. You select from a list of pre-generated commands or create your own command.
Arguments
If your command has any additional arguments i.e the say command, you can add the text you want to say here. The following example is the message I would like my server to announce to my players.
Run For*
This sets the task to run only if a certain player is on or always if “Server” is selected.
Once you have filled in all the needed information, click create and the task will be placed in a queue to be processed.
Common Issues
You may notice that the task fails at the time it is intended to run. This can happen for many reasons although the most common would be that the command you set is not functional. If you have created a custom command from the panel’s commands tab ensure everything is correct. If you have selected a premade command then this could indicate that the arguments that you have set are either incorrect or not needed.