#Daily Restart

1 messages · Page 1 of 1 (latest)

autumn lance
#

this works, but it restarts at 15:55 (because of the "contains") so is there a way to make that not happen

    if "%now%" contains "17.55" or "5.55":
        {cancelNextRestart} isn't true
        broadcast "&cThe server will restart in 5 minutes."```
lost schooner
#

just use a real time event

autumn lance
lost schooner
#
    java.util.Date
    java.text.SimpleDateFormat

event "every_real_time":
    pattern: every %time% (in|of) real world
    check:
        if expression 1 = new SimpleDateFormat("HH:mm").format(new Date()) parsed as time:
            continue

every 1 second:
    call new custom event "every_real_time"

# EXAMPLE

every 12:05 in real world:
    broadcast "Hello World"```

Requires reflect
autumn lance
#

is there no way to do this addon-free?