/schedule
Schedules a function to run after a specified delay. Can also clear previously scheduled functions.
Syntax
/schedule <function|clear> <function> <time> [append|replace]Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| action | literal | Required | function = schedule a function; clear = cancel a scheduled function. |
| function | resource | Required | The function ID to schedule (e.g., mypack:my_function). |
| time | time | Required | Delay before execution. Supports ticks (t), seconds (s), or days (d). Example: 5s, 100t, 1d. |
| mode | literal | Optional | append = add another schedule; replace = replace existing schedule (default). |
Examples
/schedule function my_pack:cleanup 5mSchedules the cleanup function to run in 5 minutes.
/schedule function my_pack:warning 10s appendSchedules a warning function in 10 seconds without canceling existing schedules.
/schedule clear my_pack:cleanupCancels all scheduled runs of the cleanup function.
Common Mistakes
- Using 'replace' mode (default) and accidentally canceling a previous schedule for the same function.
- Scheduling functions in unloaded dimensions, the function runs in the Overworld by default.
Notes
Scheduled functions run at the server level with no specific entity context. Use 'append' mode to queue multiple instances of the same function. Time units: t (ticks), s (seconds), d (Minecraft days).
Related Commands
Need a Minecraft server?
Try these commands on Astroworld or host your own server.
Try Astroworld Hosting