You are here

function elysia_cron_completed in Elysia Cron 5

Same name and namespace in other branches
  1. 5.2 elysia_cron.module \elysia_cron_completed()
  2. 6 elysia_cron.module \elysia_cron_completed()
  3. 7 elysia_cron.module \elysia_cron_completed()

Successful termination (after all shutdown hooks invoked by cron functions).

1 string reference to 'elysia_cron_completed'
elysia_cron_run in ./elysia_cron.module

File

./elysia_cron.module, line 1157

Code

function elysia_cron_completed() {
  global $elysia_cron_settings, $elysia_cron_current_channel, $cron_completed, $cron_completed_time;

  //dprint("completed ".$elysia_cron_current_channel);

  // Record cron time
  _ec_variable_set('cron_last', time());
  if (variable_get('elysia_cron_debug_messages', 0)) {
    _dco_watchdog('cron', 'Cron channel %channel run completed.', array(
      '%channel' => $elysia_cron_current_channel,
    ), WATCHDOG_NOTICE);
  }
  $stats = elysia_cron_get_channel_stats($elysia_cron_current_channel);
  $time = time() - $stats['last_run'];
  elysia_cron_set_channel_stats($elysia_cron_current_channel, -1, $time, $c = $stats['execution_count'] + 1, round(($stats['avg_execution_time'] * ($c - 1) + $time) / $c, 2), $time > $stats['max_execution_time'] ? $time : -1, time() - $cron_completed_time, 0, -1, -1, array(
    'running' => 0,
  ));
}