public function backup_migrate_schedule::run in Backup and Migrate 7.3
Same name and namespace in other branches
- 8.3 includes/schedules.inc \backup_migrate_schedule::run()
- 6.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 685 - All of the schedule handling code needed for Backup and Migrate.
Class
- backup_migrate_schedule
- A schedule class for crud operations.
Code
public function run() {
// Clear cached profile data as it could have been altered by a previous
// schedule run.
drupal_static_reset('backup_migrate_get_profiles');
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);
}
}