function rules_scheduler_run_task
Queue worker callback for running a single task.
Parameters
array $task: The task to process.
1 string reference to 'rules_scheduler_run_task'
- rules_scheduler_cron_queue_info in rules_scheduler/
rules_scheduler.module - Implements hook_cron_queue_info().
File
-
rules_scheduler/
rules_scheduler.module, line 41
Code
function rules_scheduler_run_task(array $task) {
try {
// BC support for tasks that have been already queued, before update
// rules_scheduler_update_7204() ran.
if (isset($task['state'])) {
$task['data'] = $task['state'];
}
rules_scheduler_task_handler($task)->runTask();
} catch (RulesEvaluationException $e) {
rules_log($e->msg, $e->args, $e->severity);
rules_log('Unable to execute task with identifier %id scheduled on date %date.', array(
'%id' => $task['identifier'],
'%date' => format_date($task['date']),
), RulesLog::ERROR);
}
}