You are here

function ultimate_cron_reclaim in Ultimate Cron 6

Reclaims position as the first module in the module list.

2 calls to ultimate_cron_reclaim()
ultimate_cron_enable in ./ultimate_cron.install
Implementation of hook_enable().
ultimate_cron_reclaim_submit in ./ultimate_cron.admin.inc
Submit handler for reclaiming lowest module weight.

File

./ultimate_cron.module, line 1317
@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_reclaim() {
  $weight = db_result(db_query("SELECT MIN(weight) FROM {system}"));
  $weight--;
  db_query("UPDATE {system} SET weight = '%d' WHERE name = '%s'", $weight, 'ultimate_cron');
}