class Rufus::Scheduler::CronJob

def brute_frequency

def brute_frequency
  @cron_line.brute_frequency
end

def check_frequency

def check_frequency
  return if @scheduler.frequency <= 1
    #
    # The minimum time delta in a cron job is 1 second, so if the
    # scheduler frequency is less than that, no worries.
  f = @cron_line.rough_frequency
  fail ArgumentError.new(
   "job frequency (min ~#{f}s) is higher than " +
   "scheduler frequency (#{@scheduler.frequency}s)"
  ) if f < @scheduler.frequency
end

def initialize(scheduler, cronline, opts, block)

def initialize(scheduler, cronline, opts, block)
  super(scheduler, cronline, opts, block)
  @cron_line = opts[:_t] || ::Fugit::Cron.do_parse(cronline)
  set_next_time(nil)
end

def next_time_from(time)

def next_time_from(time)
  @cron_line.next_time(time)
end

def rough_frequency

def rough_frequency
  @cron_line.rough_frequency
end

def set_next_time(trigger_time, is_post=false, now=nil)

def set_next_time(trigger_time, is_post=false, now=nil)
  return if is_post
  t = trigger_time || now || EoTime.now
  previous = @previous_time || @scheduled_at
  t = previous if ! discard_past? && t > previous
  @next_time =
    if @first_at && @first_at > t
      @first_at
    else
      @cron_line.next_time(t)
    end
end