function backup_migrate_backup_migrate_schedules in Backup and Migrate 7.3
Same name and namespace in other branches
- 8.3 backup_migrate.module \backup_migrate_backup_migrate_schedules()
- 5.2 includes/schedules.inc \backup_migrate_backup_migrate_schedules()
- 6.3 backup_migrate.module \backup_migrate_backup_migrate_schedules()
- 7.2 backup_migrate.module \backup_migrate_backup_migrate_schedules()
Implements hook_backup_migrate_destinations().
File
- ./
backup_migrate.module, line 481 - Backup and restore databases for Drupal.
Code
function backup_migrate_backup_migrate_schedules() {
require_once dirname(__FILE__) . '/includes/sources.inc';
$schedules = array();
// Declare a default backup for each source that can be enabled.
// @todo This makes setting up scheduled easier, but only when combined with
// the now disabled quick-schedule feature.
// @code
// $sources = backup_migrate_get_sources();
// foreach ($sources as $id => $source) {
// $schedule = array(
// 'schedule_id' => $id,
// 'name' => $source->get('name'),
// 'source_id' => $id,
// 'destination_id' => 'scheduled',
// 'profile_id' => 'default',
// 'period' => variable_get('backup_migrate_default_schedule', 60*60),
// 'keep' => BACKUP_MIGRATE_SMART_DELETE,
// 'enabled' => FALSE,
// );
// $schedules[$id] = backup_migrate_crud_create_item('schedule', $schedule);
// }
// @endcode
return $schedules;
}