HyperScript
Docs

← All of the Docs Commands and events

Timers

eventevery <duration>:

Once per interval, with no player (like a console command)

every 5 minutes:
    broadcast "&7Remember to vote!"
Try it
eventevery <duration> for all players:

Once per interval for each online player, as that player

every 1 second for all players:
    set line 1 of player's scoreboard to "&7Coins: &a%{%player%.coins}%"
Try it
eventevery day at <hh:mm>:since 1.5.8

Once a day at that time, by the server's clock

every day at 18:00:
    broadcast "&6The evening event starts now!"
Try it
eventevery monday at <hh:mm>:since 1.5.8

Once a week; any weekday name works

every monday at 00:00:
    delete {weekly_winner}
Try it
Guide and examples

every runs a block repeatedly for as long as the script is loaded.

every 5 minutes:
    broadcast "&7Remember to vote!"

every 1 second for all players:
    set line 1 of player's scoreboard to "&7Coins: &a%{%player%.coins}%"
FormRuns
every <duration>:Once per interval, with no player (like a console command)
every <duration> for all players:Once per interval for each online player, as that player
every day at <hh:mm>:Once a day at that time, by the server's clock
every monday at <hh:mm>:Once a week; any weekday name works
  • Durations use the same units as cooldowns; the shortest interval is 1 tick (a twentieth of a second).
  • Timers run on the server thread. Keep fast timers light, and use async: for anything heavy.
  • Timers are restarted on every reload, hot reload included.
  • Times of day are 24-hour and follow the clock of the machine the server runs on: every day at 18:00:, every friday at 20:30:. They do not drift with restarts the way a every 24 hours: timer does. A time that passes while the server is off is skipped, not caught up, and for all players may be added as with any timer.
every day at 00:00:
    delete {daily_reward_claimed}
    broadcast "&6Daily rewards are available again!"