You are here

function elysia_cron_execute_aborted in Elysia Cron 6.2

Same name and namespace in other branches
  1. 5.2 elysia_cron.module \elysia_cron_execute_aborted()
  2. 5 elysia_cron.module \elysia_cron_execute_aborted()
  3. 6 elysia_cron.module \elysia_cron_execute_aborted()
  4. 7.2 elysia_cron.module \elysia_cron_execute_aborted()
  5. 7 elysia_cron.module \elysia_cron_execute_aborted()
2 calls to elysia_cron_execute_aborted()
elysia_cron_check_run_channel in ./elysia_cron.module
Check if the channel is idle (not running, or stuck). If so set returns available jobs.
elysia_cron_internal_execute_channel_cleanup in ./elysia_cron.module
Shutdown function for cron cleanup.

File

./elysia_cron.module, line 1357

Code

function elysia_cron_execute_aborted($channel) {
  global $elysia_cron_settings_by_channel;
  $last_job = '';
  foreach ($elysia_cron_settings_by_channel[$channel] as $job => $conf) {
    if ($job != '#data') {
      if (elysia_cron_is_job_running($job)) {
        $last_job .= ' ' . $job;
        elysia_cron_set_job_running($job, 0);
      }
    }
  }
  elysia_cron_set($channel, true, array(
    'running' => 0,
    //time(),
    'last_aborted' => 1,
    'abort_count' => elysia_cron_get_channel_abort_count($channel) + 1,
    'last_abort_function' => $last_job,
  ));
  return trim($last_job);
}