Commands/schedule

From Minecraft Wiki
Jump to: navigation, search
Grass Block.svg
This page contains content on features that may be included in the next update.
These features have appeared in development versions, but the full update containing these features has not been released yet.
schedule
Restrictions

Operator

First introduced

Java Edition 1.14 (Java Edition 18w43a )

Delays the execution of a function.

Syntax
schedule function <function: string> <time: int>
Arguments
function
Specifies the function to delay.
time
Specifies the amount of time in gameticks to delay the function by.


Result
Fails if the arguments are not specified correctly or the function does not exist.
On success, executes the function after specified amount of time.


Notes

Even when using "/execute as", the scheduled function will always run as the Server.

Scheduling the same function before it is successfully ran will overwrite 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.