You are here

function _cronNextOrEqual in Elysia Cron 7.2

Helper function for _elysia_cron_next_run().

1 call to _cronNextOrEqual()
_elysia_cron_next_run in ./elysia_cron_scheduler.inc
Helper function for cron run schedule.

File

./elysia_cron_scheduler.inc, line 125
Schedules cron runs.

Code

function _cronNextOrEqual($el, $arr, $range_start, $range_end) {
  if (empty($arr)) {
    return $el;
  }
  foreach ($arr as $x) {
    if ($x >= $el) {
      return $x;
    }
  }
  return $range_end + reset($arr) + 1 - $range_start;
}