Give the channel a durable schedule: fixed slots ("news at 18:00") and dayparts ("no kids content after 22:00"). The scheduler re-honours these on EVERY rebuild, so you set them once instead of babysitting the grid. **Pro tier or higher.**
This REPLACES the entire ruleset — send every rule you want, not just new ones. Sending an empty array removes all rules and returns the channel to plain weighted-random. Validate first with validate_schedule_rules.
Rule shapes:
time_slot {rule_type:'time_slot', start_time:'18:00', end_time?:'21:00',
days_mask:127, selector_type:'asset'|'tag'|'playlist',
selector_value:<id|tag|[ids]>, priority?:0}
daypart_weight {rule_type:'daypart_weight', start_time:'22:00', end_time:'06:00',
days_mask:127, selector_type:'asset'|'tag', selector_value:...,
weight_multiplier:0-10}
days_mask is a bitmask: bit0=Mon … bit6=Sun. 127=daily, 31=Mon-Fri, 96=weekend.
end_time on a time_slot makes it a BLOCK that keeps drawing from the selector until that time — that is how you get 'cartoons 06:00-09:00' rather than one cartoon.
selector_type 'playlist' with an array of asset ids plays them IN ORDER.
weight_multiplier 0 removes matching assets from that window entirely.
Set `timezone` (IANA) or the times mean UTC, which is almost never what the owner meant. Slots start ON-OR-AFTER their time: the programme running into a slot is never cut short, so an 18:00 slot may begin at 18:02. That is intended.
Connector