Skip to main content

/schedule

Schedules a function to run after a specified delay. Can also clear previously scheduled functions.

Category
Logic
Permission Level
Game Master
Version Added
1.14

Syntax

/schedule <function|clear> <function> <time> [append|replace]

Parameters

NameTypeRequiredDescription
actionliteralRequiredfunction = schedule a function; clear = cancel a scheduled function.
functionresourceRequiredThe function ID to schedule (e.g., mypack:my_function).
timetimeRequiredDelay before execution. Supports ticks (t), seconds (s), or days (d). Example: 5s, 100t, 1d.
modeliteralOptionalappend = add another schedule; replace = replace existing schedule (default).

Examples

/schedule function my_pack:cleanup 5m

Schedules the cleanup function to run in 5 minutes.

/schedule function my_pack:warning 10s append

Schedules a warning function in 10 seconds without canceling existing schedules.

/schedule clear my_pack:cleanup

Cancels all scheduled runs of the cleanup function.

Common Mistakes

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