public function UltimateCronBackgroundProcessLegacyLauncher::cron_alter in Ultimate Cron 7.2
Implements hook_cron_alter().
Overrides UltimateCronPlugin::cron_alter
File
- plugins/
ultimate_cron/ launcher/ background_process_legacy.class.php, line 17 - Background Process 1.x launcher for Ultimate Cron.
Class
- UltimateCronBackgroundProcessLegacyLauncher
- Ultimate Cron launcher plugin class.
Code
public function cron_alter(&$jobs) {
unset($jobs['background_process_cron']);
if (isset($jobs['ultimate_cron_plugin_launcher_background_process_legacy_cleanup'])) {
$job =& $jobs['ultimate_cron_plugin_launcher_background_process_legacy_cleanup'];
$job->hook['scheduler'] = isset($job->hook['scheduler']) ? $job->hook['scheduler'] : array();
$scheduler =& $job->hook['scheduler'];
$scheduler['simple'] = isset($scheduler['simple']) ? $scheduler['simple'] : array();
$scheduler['crontab'] = isset($scheduler['crontab']) ? $scheduler['crontab'] : array();
$scheduler['simple'] += array(
'rules' => array(
'* * * * *',
),
);
$scheduler['crontab'] += array(
'rules' => array(
'* * * * *',
),
);
}
}