Cron Scheduler
A minecraft plugin that runs console commands on cron schedules
Quick challenge
How far can you run before the mobs catch you?
Minecraft check
Confirm your run
Complete the quick check to get your code.
Cron Scheduler
Scheduler
A minecraft plugin that runs console commands on cron schedules.
Configuration
```yaml schedules:
my-schedule: cron: "*/10 * * * *" # every 10 minutes parallel: false # run commands one after another commands: - "save-all flush" - "broadcast Server saved!"
another-schedule: enabled: false # set to true to activate cron: "0 2 * * *" # every day at 02:00 parallel: true # run all commands at the same time commands: - "broadcast Nightly task running" - "say Hello from cron" ```
Schedule fields
| Field | Required | Description | |------------|----------|----------------------------------------------------------------------------| | `cron` | ✅ | Standard 5-field cron expression | | `commands` | ✅ | List of console commands to run (no leading `/`) | | `parallel` | ❌ | `true` = all commands fire at once, `false` (default) = sequential | | `enabled` | ❌ | Set to `false` to disable a schedule without deleting it (default: `true`) |
Cron syntax
Five space-separated fields: `minute hour day-of-month month day-of-week`
| Field | Range | Special characters | |--------------|------------------|--------------------| | Minute | 0–59 | `*` `,` `-` `/` | | Hour | 0–23 | `*` `,` `-` `/` | | Day of month | 1–31 | `*` `,` `-` `/` | | Month | 1–12 | `*` `,` `-` `/` | | Day of week | 0–6 (0 = Sunday) | `*` `,` `-` `/` |
Examples
| Expression | Meaning | |------------------|----------------------------------------| | `* * * * *` | Every minute | | `*/5 * * * *` | Every 5 minutes | | `0 * * * *` | Every hour (at :00) | | `0 2 * * *` | Every day at 02:00 | | `0 0 * * 0` | Every Sunday at midnight | | `0 9-17 * * 1-5` | Every hour 09:00–17:00, Monday–Friday | | `0 12 1,15 * *` | Noon on the 1st and 15th of each month |
Parallel vs sequential
- `parallel: false` — all commands are dispatched in the same server tick. - `parallel: false` — commands are dispatched one per tick in order, so each command's synchronous side-effects complete before the next one starts.
Commands
All commands require the `cronscheduler.admin` permission (default: op).
| Command | Alias | Description | |-----------------------------|------------------|----------------------------------------| | `/cronscheduler reload` | `/cs reload` | Reload `config.yml` without restarting | | `/cronscheduler list` | `/cs list` | Show all active schedules | | `/cronscheduler run <name>` | `/cs run <name>` | Immediately trigger a schedule by name |
Permissions
| Permission | Default | Description | |-----------------------|---------|-------------------------------| | `cronscheduler.admin` | op | Access to all plugin commands |