Method: Sensu::Utilities#determine_check_cron_time

Defined in:
lib/sensu/utilities.rb

#determine_check_cron_time(check) ⇒ Object

Determine the next check cron time.

Parameters:

  • check (Hash)

    definition.



391
392
393
394
395
396
# File 'lib/sensu/utilities.rb', line 391

def determine_check_cron_time(check)
  cron_parser = CronParser.new(check[:cron])
  current_time = Time.now
  next_cron_time = cron_parser.next(current_time)
  next_cron_time - current_time
end