Schedule Functions by Time or Loaded Area
The /schedule command in Minecraft Bedrock Edition lets you set up a function to run automatically at a later time. You can trigger the function after a countdown of ticks, seconds, or game days, or wait until a specific chunk of the world is loaded.
Map makers and server creators use this command to build timed events, delayed traps, or custom cutscenes. It requires the Game Directors permission level and cheats must be turned on in your world settings.
/schedule delay add <function: filepath> <time: int> [DelayMode: DelayMode]Schedule function call, delay time ticks
/schedule delay add <function: filepath> <time: time> [DelayMode: DelayMode]Schedule function call, delay time ticks
/schedule delay add <function: filepath> <time: time> [DelayMode: DelayMode]Schedule function call, delay time seconds
/schedule delay add <function: filepath> <time: time> [DelayMode: DelayMode]Schedule function call, delay time days
/schedule delay clear <function: filepath>Clear Scheduled delay functions
/schedule clear <function: filepath>Clear Scheduled functions
/schedule on_area_loaded add <from: x y z> <to: x y z> <function: filepath>Schedule function call when area loaded, location
/schedule on_area_loaded add circle <center: x y z> <radius: int> <function: filepath>Schedule function call when area loaded, radius
/schedule on_area_loaded add tickingarea <name: string> <function: filepath>Schedule function call when area loaded, ticking area
/schedule on_area_loaded clear tickingarea <name: string> [function: filepath]Clear scheduled area loaded functions, ticking area name
/schedule on_area_loaded clear function <function: filepath>Clear scheduled area loaded functions, function name
| Argument | Type | What it means |
|---|---|---|
center: x y z | position | A `vector` [x y z] that specifies the center of a defined loaded area. |
DelayMode | DelayMode | An `enum` of either `append` to allow multiple schedules or `replace` to replace the default schedule. |
from: x y z | position | A `vector` [x y z] that specifies the rectangular area to load, along with `to`. |
function | filepath | Required. The function to run. |
name | string | A `string` that defines the `tickingarea` where the command is added. |
radius | int | An `integer` that specifies the area as the number of chunks loaded in. Default: `0`. |
time | int | Time integer |
time | time | Time |
to: x y z | position | A vector [x y z] that specifies the rectangular area to load, along with `from`. |
/schedule delay add arena/start_wave 100Schedules the start_wave function to run after a delay of 100 game ticks.
/schedule delay add traps/lava_drop 60 replaceSets the lava_drop function to trigger in 60 ticks and replaces any existing timer for it.
/schedule delay add rewards/daily_loot 24000 appendAdds a new 24000-tick schedule for the daily_loot function without canceling earlier ones.
/schedule delay clear traps/lava_dropCancels the time delay schedule for the lava_drop function before it goes off.
/schedule on_area_loaded add 100 64 100 120 80 120 dungeons/spawn_bossRuns the spawn_boss function once the rectangular box from 100 64 100 to 120 80 120 is loaded.
/schedule on_area_loaded add circle -250 70 400 3 towns/load_villagersExecutes the load_villagers function when a 3-chunk radius around -250 70 400 loads in.
/schedule on_area_loaded add tickingarea castle_zone quests/king_introTriggers the king_intro function as soon as the ticking area named castle_zone is loaded.
/schedule on_area_loaded clear tickingarea castle_zone quests/king_introClears the scheduled king_intro function from the castle_zone ticking area.
In Minecraft Java Edition, the command is shorter and only supports time delays, using the syntax /schedule function <function> <time> [append|replace] and /schedule clear <function> without any options for waiting on loaded areas or ticking areas.
Choosing append lets you queue up multiple timers for the exact same function at once, while replace deletes the current timer and starts a fresh one.
You can stop a pending function before it runs by using /schedule clear, /schedule delay clear, or /schedule on_area_loaded clear followed by the function path or ticking area name.
You must have the Game Directors permission level and cheats enabled in the world to run this command.
/dialogue/execute/function/packstack/reload/reloadpacketlimitconfig/scoreboard/scriptevent/sendshowstoreoffer/tag/testfor/testforblock/testforblocks/toggledownfall