You are here

function backup_migrate_cron in Backup and Migrate 8.4

Same name and namespace in other branches
  1. 8.2 backup_migrate.module \backup_migrate_cron()
  2. 8.3 backup_migrate.module \backup_migrate_cron()
  3. 5.2 backup_migrate.module \backup_migrate_cron()
  4. 5 backup_migrate.module \backup_migrate_cron()
  5. 6.3 backup_migrate.module \backup_migrate_cron()
  6. 6 backup_migrate.module \backup_migrate_cron()
  7. 6.2 backup_migrate.module \backup_migrate_cron()
  8. 7.3 backup_migrate.module \backup_migrate_cron()
  9. 7.2 backup_migrate.module \backup_migrate_cron()
  10. 5.0.x backup_migrate.module \backup_migrate_cron()

Implements hook_cron().

Runs all of the enabled schedules if they are due to be run..

File

./backup_migrate.module, line 188
Primary hook implementations for Backup Migrate.

Code

function backup_migrate_cron() {
  $bam = backup_migrate_get_service_object([], [
    'nobrowser' => TRUE,
  ]);
  $schedules = Schedule::loadMultiple();
  foreach ($schedules as $schedule) {
    $schedule
      ->run($bam);
  }
}