⏳
Advanced
/schedule
Run a datapack function after a set amount of time.
At a glance
Syntax
Syntax
/schedule function <id> <time>commandtargetcoordsvaluerequiredoptional
See it
What it does
Runs after a set delay
Anatomy
Every part, explained
- 1
CommandRequired/scheduleSchedules a function to run later.
- 2
ActionRequiredfunctionUse function or clear.
- 3
Function IDRequired<id>The function to run, like mypack:loop.
- 4
DelayRequired<time>Wait time in ticks (t), seconds (s), or days (d).
Your turn
Try it yourself
Playground
4 tokens · press Enter to run
Copy & paste
Examples
/schedule function mypack:loop 20tRun after 20 ticks (1 second).
/schedule function mypack:loop 5sRun after 5 seconds.
/schedule clear mypack:loopCancel a scheduled function.
Avoid these
Common mistakes
✕
/schedule mypack:loop 20t✓
/schedule function mypack:loop 20tInclude the word function before the ID.
✕
/schedule function mypack:loop 20✓
/schedule function mypack:loop 20tAdd a time unit like t, s, or d.
Keep going