You are here

function elysia_cron_set_job_stats in Elysia Cron 5

Same name and namespace in other branches
  1. 5.2 elysia_cron.module \elysia_cron_set_job_stats()
  2. 6.2 elysia_cron.module \elysia_cron_set_job_stats()
  3. 6 elysia_cron.module \elysia_cron_set_job_stats()
  4. 7.2 elysia_cron.module \elysia_cron_set_job_stats()
  5. 7 elysia_cron.module \elysia_cron_set_job_stats()
2 calls to elysia_cron_set_job_stats()
elysia_cron_execute in ./elysia_cron.module
elysia_cron_reset_stats in ./elysia_cron.module

File

./elysia_cron.module, line 651

Code

function elysia_cron_set_job_stats($job, $last_run = -1, $last_execution_time = -1, $execution_count = -1, $avg_execution_time = -1, $max_execution_time = -1, $data = array()) {
  if ($last_run != -1) {
    $data['last_run'] = $last_run;
  }
  if ($last_execution_time != -1) {
    $data['last_execution_time'] = $last_execution_time;
  }
  if ($execution_count != -1) {
    $data['execution_count'] = $execution_count;
  }
  if ($avg_execution_time != -1) {
    $data['avg_execution_time'] = $avg_execution_time;
  }
  if ($max_execution_time != -1) {
    $data['max_execution_time'] = $max_execution_time;
  }
  elysia_cron_set($job, false, $data);
}