You are here

function elysia_cron_internal_execute_channel_completed in Elysia Cron 6.2

Same name and namespace in other branches
  1. 7.2 elysia_cron.module \elysia_cron_internal_execute_channel_completed()

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

1 string reference to 'elysia_cron_internal_execute_channel_completed'
elysia_cron_internal_execute_channel in ./elysia_cron.module
Internal function to execute all jobs in a channel elysia_cron_lock_env() must be called BEFORE calling this method

File

./elysia_cron.module, line 1402

Code

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

  // Record cron time
  _ec_variable_set('cron_last', time());
  elysia_cron_debug('Cron channel %channel run completed.', array(
    '%channel' => $elysia_cron_current_channel,
  ));
  $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,
  ));
}