function ultimate_cron_trigger_poorman in Ultimate Cron 7
Same name and namespace in other branches
- 8 ultimate_cron.module \ultimate_cron_trigger_poorman()
- 6 ultimate_cron.module \ultimate_cron_trigger_poorman()
Launch poorman cron if it's time to do so.
1 call to ultimate_cron_trigger_poorman()
- ultimate_cron_init in ./
ultimate_cron.module - Implements hook_init().
File
- ./
ultimate_cron.module, line 550 - @todo Add filter on overview page. @todo Add log view (with graph). @todo Make proper markup for overview page. @todo Refactor drush stuff, too many intimate relations with Background Process @todo Refactor Cron % offset stuff. Too mixed up and…
Code
function ultimate_cron_trigger_poorman() {
// Launch poormans cron if applicable
if (variable_get('ultimate_cron_poorman', ULTIMATE_CRON_POORMAN) && !_ultimate_cron_incompatible_modules()) {
$last = variable_get('cron_last', 0);
$last = floor($last / 60) * 60;
$time = time();
$time = floor($time / 60) * 60;
// Don't attempt, if already run within last minute
if ($last < $time) {
ultimate_cron_launch_poorman();
}
}
}