How to Use Pterodactyl Schedules for Automation
Automate restarts, backups, and console commands on your game servers with Pterodactyl schedules using cron expressions.
What Are Pterodactyl Schedules?
Pterodactyl schedules let you run tasks at fixed intervals without any external tools. Each schedule fires at times defined by a cron expression and can contain one or more tasks that execute in order. Common uses include automatic restarts, timed backups, broadcast messages, and map rotations.
Creating a Schedule
Open your server in the panel, click the Schedules tab, and hit Create Schedule. Give it a descriptive name, then enter a cron expression. Here are a few examples:
| Expression | Meaning |
|---|---|
0 */4 * * * | Every 4 hours |
30 3 * * * | Daily at 03:30 |
0 0 * * 0 | Every Sunday at midnight |
*/15 * * * * | Every 15 minutes |
Enable the schedule, then add tasks to it.
Task Types
Pterodactyl schedules support four task types:
- Send Command: Sends a console command as if you typed it, e.g.
say Server restarting in 1 minute! - Send Power Action: Start, stop, restart, or kill the server.
- Create Backup: Triggers a panel backup (respects the server's backup limit).
- Delete Files: Removes files matching a path or glob pattern.
Chaining Tasks with Offsets
Each task can have a time offset in seconds. For example, a restart routine might look like this:
- 0s: Send Command
say Restarting in 60 seconds! - 30s: Send Command
say Restarting in 30 seconds! - 55s: Send Command
save-all - 60s: Send Power Action
restart
The offset is relative to the previous task, not the schedule trigger time.
Practical Examples
Nightly Backup + Restart
Create a schedule at 0 4 * * * (4 AM). First task: create backup. Second task (offset 120s): restart. This gives the backup time to finish before the restart fires.
Hourly Lag Prevention
Some modded servers benefit from periodic garbage collection. Schedule 0 * * * * with a save-all command followed by a restart 10 seconds later.
Pterodactyl schedules complement server-side scheduling plugins. For broader automation ideas, see scheduling server tasks in Minecraft.
Skip the panel setup entirely. Astroworld Hosting comes with a full Pterodactyl panel, file manager, console, and scheduling on every plan.
Well-tuned pterodactyl schedules keep your servers responsive without requiring you to be online at odd hours.