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.
Write the schedule
Section titled “Write the schedule”-
Open
zones.ymland find your zone.If the zone does not exist yet, create it first with
/sh create, as shown in your first zone. -
Add a
scheduleblock to it.zones.yml zones:kothjapon:world: eventscenter:x: 1500z: 1500radius: 150schedule:- days: [friday, saturday]start: '21:00'stop: '22:30' -
Apply it.
/sh reload -
Check that it was read.
/sh info kothjaponThe 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.
The three fields
Section titled “The three fields”| Field | Required | What to write |
|---|---|---|
days | Yes | [friday, saturday], or daily for every day. Short forms work too: [fri, sat]. |
start | Yes | The time the zone opens, quoted: '21:00'. |
stop | No | The 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.
Different hours on different days
Section titled “Different hours on different days”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:
schedule: - days: [friday, saturday] start: '21:00' stop: '23:00' - days: [tuesday] start: '19:00' stop: '20:00'Events that run past midnight
Section titled “Events that run past midnight”Write the times as they are. SomaHider works out that a stop earlier than the start means the next
day:
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.
What can cut your schedule short
Section titled “What can cut your schedule short”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: 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.
What happens when the server restarts
Section titled “What happens when the server restarts”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.
One thing that will not work
Section titled “One thing that will not work”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.