You are here

function _workbench_scheduler_run in Workbench Scheduler 7

Same name and namespace in other branches
  1. 7.2 workbench_scheduler.module \_workbench_scheduler_run()

Process the different workbench scheduler schedules.

2 calls to _workbench_scheduler_run()
workbench_scheduler_cron in ./workbench_scheduler.module
Implements hook_cron().
workbench_scheduler_drush_run in ./workbench_scheduler.drush.inc
Callback function.

File

./workbench_scheduler.module, line 506
Content scheduling for Workbench.

Code

function _workbench_scheduler_run() {
  $count = 0;

  // Only run if there are schedules.
  if (workbench_scheduler_schedules_exist()) {

    // Run scheduler.
    $curr_time = time();

    // Process the start date schedules.
    $count += workbench_scheduler_process_start_dates($curr_time);

    // Process the end date schedules.
    $count += workbench_scheduler_process_end_dates($curr_time);
  }
  return $count;
}