function backup_migrate_cronapi in Backup and Migrate 8.3
Same name and namespace in other branches
- 6.3 backup_migrate.module \backup_migrate_cronapi()
- 7.3 backup_migrate.module \backup_migrate_cronapi()
Implements hook_cronapi().
File
- ./
backup_migrate.module, line 280 - Create (manually or scheduled) and restore backups of your Drupal MySQL database with an option to exclude table data (e.g. cache_*)
Code
function backup_migrate_cronapi($op, $job = NULL) {
$items = array();
backup_migrate_include('schedules');
foreach (backup_migrate_get_schedules() as $schedule) {
if ($schedule
->get('cron') == BACKUP_MIGRATE_CRON_ELYSIA) {
$id = $schedule
->get('id');
$items['backup_migrate_' . $id] = array(
'description' => t('Run the Backup and Migrate \'!name\' schedule', array(
'!name' => $schedule
->get('name'),
)),
'rule' => $schedule
->get('cron_schedule'),
'callback' => 'backup_migrate_schedule_run',
'arguments' => array(
$id,
),
'file' => 'includes/schedules.inc',
);
}
}
return $items;
}