Commands/schedule

, delays the execution of a function. The function executes on the server after specified amount of time passes.
, schedules a function to be executed once an area is loaded.
==Syntax==
* Java Edition
: schedule function <function> <time> [append|replace]
:: Adds a schedule.
: schedule clear <function>
:: Removes a schedule.
* Bedrock Edition
: schedule on_area_loaded add <from: x y z> <to: x y z> <function:filepath>
: schedule on_area_loaded add circle <radius: int> <function: filepath>
: schedule on_area_loaded add tickingarea <name: string> <function: filepath>
:: Adds a schedule to be executed once an area is loaded.
==Arguments==
: Specify the function to be run.
: 
: 
: Specify the delay time.
: 
: (in mode)
: Specify the function to be cleared. Should be a namespaced ID (minecraft: cannot be omitted) or a function tag(minecraft: cannot be omitted).
: 
: append|replace
: replace simply replaces the current function's schedule time (default).
: append allows multiple schedules to exist at different times.
: and 
: Specify the coordinates of opposite corners of a rectangular area used to define a loaded area.
: 
: For x and z, numbers less than -30,000,000 or greater than 30,000,000 are treated as -30,000,000 or 30,000,000 respectively.
: 
: Specifies the coordinates of the center point of a circular area used to define a loaded area.
: 
: For x and z, numbers less than -30,000,000 or greater than 30,000,000 are treated as -30,000,000 or 30,000,000 respectively.
: 
: Specifies the radius of a circular loaded area as the number of chunks from the center to the edge of the circle. 
: It should be between 0 and 2,147,483,647 (inclusive).
: 
: Specifies the name of a ticking area, executes function when which is added.
: It must be either a single word (no spaces) or a quoted string.
==Result==
== Output ==
==Notes==
, cannot set two schedules to execute the same function at the same game tick.
, in append mode, scheduling the same function before it is successfully run 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 replaces the original.
Even when using the execute as ... command, the scheduled function always runs as the Server at world spawn point.
== History ==
de:Befehl/schedule
es:Comandos/schedule
ja:コマンド/schedule
pt:Comandos/schedule
zh:命令/schedule