struct
PlaceOS::Model::Playlist::Schedule
- PlaceOS::Model::Playlist::Schedule
- Struct
- Value
- Object
Included Modules
- JSON::Serializable
Defined in:
placeos-models/playlist/schedule.crConstant Summary
-
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(pull : JSON::PullParser)
- .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)
Instance Method Summary
-
#mask : String | Nil
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
-
#play_at : Int64 | Nil
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. - #play_at_local : String | Nil
- #play_cron : String
- #play_period : Int32
- #play_takeover : Bool
- #valid? : Bool
- #valid_from : Int64 | Nil
- #valid_until : Int64 | Nil
-
#validation_message : String | Nil
nilwhen the schedule is valid, otherwise a human-readable reason.
Constructor Detail
Instance Method Detail
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
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.
nil when the schedule is valid, otherwise a human-readable reason.