function ultimate_cron_hook_should_run in Ultimate Cron 6
Same name and namespace in other branches
- 8 ultimate_cron.module \ultimate_cron_hook_should_run()
- 7 ultimate_cron.module \ultimate_cron_hook_should_run()
Check if a hook should be run now.
Parameters
array $hook:
Return value
boolean
5 calls to ultimate_cron_hook_should_run()
- drush_ultimate_cron_cron_run in ./
ultimate_cron.drush.inc - Run cron job(s)
- ultimate_cron_cron in ./
ultimate_cron.module - Implementation of hook_cron().
- ultimate_cron_cronapi in ./
ultimate_cron.module - Implements hook_cronapi().
- ultimate_cron_get_schedule in ./
ultimate_cron.module - Get a list of functions that should be run now.
- _ultimate_cron_run_hook in ./
ultimate_cron.module - This is the function that is launched into a background process. It runs the cron job and does housekeeping, pre/post execute hooks, etc.
File
- ./
ultimate_cron.module, line 974 - @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_hook_should_run($hook) {
// Is it enabled?
if (empty($hook['settings']['enabled'])) {
return FALSE;
}
$last_run = isset($hook['log']['start']) ? $hook['log']['start'] : 0;
return ultimate_cron_should_run($hook['settings']['rules'], $last_run, time(), $hook['settings']['catch_up'], $hook['delta']);
}