function _ultimate_cron_poorman in Ultimate Cron 8
Same name and namespace in other branches
- 6 ultimate_cron.module \_ultimate_cron_poorman()
- 7 ultimate_cron.module \_ultimate_cron_poorman()
The actual poorman function
Return value
type
1 string reference to '_ultimate_cron_poorman'
- ultimate_cron_launch_poorman in ./
ultimate_cron.module - Launch the poormans cron background process.
File
- ./
ultimate_cron.module, line 764 - @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_poorman() {
if (!variable_get('ultimate_cron_poorman', ULTIMATE_CRON_POORMAN) || _ultimate_cron_incompatible_modules()) {
return;
}
// Restart when done
background_process_keepalive();
// Derive current minute
$time = time();
$time = floor($time / 60) * 60;
// Run the cron
ultimate_cron_cron_run(TRUE);
// Wait until end of "current" minute
$wait = $time + 60 - time();
if ($wait > 0 && $wait <= 60) {
sleep($wait);
}
}