Commands/schedule

From Minecraft Wiki
Jump to: navigation, search
schedule
Restrictions

Operator

First introduced

Java Edition 1.14 (Java Edition 18w43a)

Delays the execution of a function.

Syntax
schedule function <function> <time>
Arguments
<function>
Specify the function to be run.
<time>
Specify the delay time in days, seconds, or ticks (default if no specifier).
Follows the form integer + character (d|s|t|).
Example: 2d specifies two in-game days.
Example: 250 or 250t specifies 250 ticks.
Result
Fails if the arguments are of invalid syntax or the function does not exist within a top-level folder in [WORLD_NAME]/datapacks/[DATA_PACK_NAME]/data/[NAMESPACE]/functions.
On success, executes the function after specified amount of time passes.


Notes
Even when using the execute as ... command, the scheduled function always runs as the Server.
Scheduling the same function before it is successfully ran overwrites the previous schedule. If you schedule a function to happen in 5 seconds, then schedule the same function again before the 5 seconds are up, the new schedule will be the one that happens.

History[edit]

Java Edition
1.1418w43aAdded /schedule.