You are here

function backup_migrate_schedule::run in Backup and Migrate 8.3

Same name and namespace in other branches
  1. 6.3 includes/schedules.inc \backup_migrate_schedule::run()
  2. 7.3 includes/schedules.inc \backup_migrate_schedule::run()

Run the actual schedule.

1 call to backup_migrate_schedule::run()
backup_migrate_schedule::cron in includes/schedules.inc
Perform the cron action. Run the backup if enough time has elapsed.

File

includes/schedules.inc, line 638
All of the schedule handling code needed for Backup and Migrate.

Class

backup_migrate_schedule
A schedule class for crud operations.

Code

function run() {
  if ($settings = $this
    ->get_profile()) {
    $settings->source_id = $this
      ->get('source_id');
    $settings->destination_id = $this
      ->get('destination_ids');
    $this
      ->update_last_run(time());
    backup_migrate_perform_backup($settings);
    $this
      ->remove_expired_backups();
  }
  else {
    backup_migrate_backup_fail("Schedule '%schedule' could not be run because requires a profile which is missing.", array(
      '%schedule' => $schedule
        ->get_name(),
    ), $settings);
  }
}