Skip to content

Running a zone on a weekly schedule

Your KoTH runs every Friday and Saturday evening, from 21:00 to 22:30. Instead of asking a staff member to be online and type /sh start, you can write those hours down once and let SomaHider handle it.

This works when the times never change. If your events start whenever an admin decides, use a chat trigger instead: it follows the announcement rather than the clock.

  1. Open zones.yml and find your zone.

    If the zone does not exist yet, create it first with /sh create, as shown in your first zone.

  2. Add a schedule block to it.

    zones.yml
    zones:
    kothjapon:
    world: events
    center:
    x: 1500
    z: 1500
    radius: 150
    schedule:
    - days: [friday, saturday]
    start: '21:00'
    stop: '22:30'
  3. Apply it.

    /sh reload
  4. Check that it was read.

    /sh info kothjapon

    The schedule appears in the zone details. If it is missing, SomaHider could not read it and the reason is in the server log.

The zone now opens by itself at 21:00 on Friday and Saturday, and closes at 22:30.

FieldRequiredWhat to write
daysYes[friday, saturday], or daily for every day. Short forms work too: [fri, sat].
startYesThe time the zone opens, quoted: '21:00'.
stopNoThe time it closes, quoted.

Leaving out stop means the zone opens at the start time and stays open until its duration runs out, or until someone stops it by hand.

A schedule is a list, so add as many entries as you need. Your event can run late on the weekend and early during the week:

zones.yml
schedule:
- days: [friday, saturday]
start: '21:00'
stop: '23:00'
- days: [tuesday]
start: '19:00'
stop: '20:00'

Write the times as they are. SomaHider works out that a stop earlier than the start means the next day:

zones.yml
schedule:
- days: [saturday]
start: '23:00'
stop: '01:00'

That zone opens Saturday at 23:00 and closes Sunday at 01:00. In days you always name the day the event starts on, never the day it ends.

A scheduled run obeys the same time limit as any other. If your slot lasts three hours but the zone has max_duration: 1h, the zone closes after one hour and stays closed until the next slot.

The same applies without any max_duration on the zone: default_max_duration from config.yml takes over, and it ships at two hours.

So if your slot is longer than two hours, say so on the zone:

zones.yml
zones:
kothjapon:
max_duration: none
schedule:
- days: [saturday]
start: '20:00'
stop: '23:30'

max_duration: none means the schedule is the only thing deciding when the zone stops.

Slots are checked once a minute against the server clock.

A slot that came and went while the server was down is not replayed on boot. If your zone was supposed to open at 21:00 and the server came back at 21:20, the zone stays closed and waits for its next slot. Start it by hand with /sh start if you still want it that evening.

A zone with always_on: true is open permanently, so there is nothing to schedule. SomaHider ignores the schedule block on such a zone and says so in the log.