All commands
โณ
AdvancedJava โœ“Bedrock -

/schedule

Run a datapack function after a set amount of time.

๐ŸชจThis command is Java Edition only - Bedrock has no direct equivalent.

Overview

What is the /schedule command?

The /schedule command delays running a function until a set number of ticks later โ€” the command-system equivalent of a timer. You can append to or replace an existing schedule, and clear pending ones.

It's essential for datapacks that need delays, cooldowns, repeating loops, or staged sequences without redstone clocks.

When to use it: Use /schedule to run a function after a delay โ€” timers, cooldowns, and self-repeating loops in datapacks.

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. 1
    /scheduleCommandRequired

    Schedules a function to run later.

  2. 2
    functionActionRequired

    Use function or clear.

  3. 3
    <id>Function IDRequired

    The function to run, like mypack:loop.

  4. 4
    <time>DelayRequired

    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 20t

Run after 20 ticks (1 second).

/schedule function mypack:loop 5s

Run after 5 seconds.

/schedule clear mypack:loop

Cancel a scheduled function.

Avoid these

Common mistakes

โœ•/schedule mypack:loop 20t
โœ“/schedule function mypack:loop 20t

Include the word function before the ID.

โœ•/schedule function mypack:loop 20
โœ“/schedule function mypack:loop 20t

Add a time unit like t, s, or d.

Good to know

Frequently asked questions

How do you delay a function in Minecraft?
Run /schedule function <name> <time>, e.g. /schedule function mypack:loop 100t to run it in 5 seconds.
How do you make a repeating loop with /schedule?
Have the function schedule itself at the end, so each run queues the next โ€” a clean tick-free loop.
How do you cancel a scheduled function?
Use /schedule clear <name> to remove a pending schedule before it fires.

Keep going

Related commands