struct

PlaceOS::Model::Playlist::Schedule

Inherits JSON::Serializable < Struct < Value < Object

Constants

MAX_MASK_SIZE = 128
PLAY_AT_LOCAL_FORMAT = "%Y-%m-%dT%H:%M:%S"
PLAY_AT_LOCAL_REGEX = /\A\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\z/

Constructors

new(play_cron : String = "0 0 * * *", play_period : Int32 = 1440, play_takeover : Bool = false, play_at : Int64 | Nil = nil, play_at_local : String | Nil = nil, valid_until : Int64 | Nil = nil, valid_from : Int64 | Nil = nil, mask : String | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

mask

bitmask on schedule, requires a valid from date if mask.size > 0 then valid_from is required and mask is considered active max mask size is 128 and string can only contain 0's and 1's

Source
play_at

a one-off play time, either as a unix epoch (play_at) or as a wall-clock time in the display's local timezone (play_at_local, an ISO 8601 string with no offset, e.g. "2027-01-01T00:00:00"). These are mutually exclusive.

Source
play_at_local
Source
play_cron
Source
play_period
Source
play_takeover
Source
valid?
Source
valid_from
Source
valid_until
Source
validation_message

nil when the schedule is valid, otherwise a human-readable reason.

Source