module Locd::Agent::Job::Types

Modules

Public Class Methods

start_calendar_interval() click to toggle source
# File lib/locd/agent/job.rb, line 22
def self.start_calendar_interval
  t.and(
    t.shape(
      minute:   t.maybe( t.non_neg_int ),
      hour:     t.maybe( t.non_neg_int ),
      day:      t.maybe( t.and( t.int, 0..31 ) ),
      weekday:  t.maybe( t.and( t.int, 0..7 ) ),
      month:    t.maybe( t.and( t.int, 0..11 ) ),
    ),
    # All values can't be `nil`
    t.not( t.hash_( values: nil ) ),
  )
end
start_calendar_intervals() click to toggle source
# File lib/locd/agent/job.rb, line 36
def self.start_calendar_intervals
  t.array start_calendar_interval
end