function cleaner_cron in Cleaner 6
Same name and namespace in other branches
- 8.2 cleaner.module \cleaner_cron()
 - 8 cleaner.module \cleaner_cron()
 - 5 cleaner.module \cleaner_cron()
 - 7 cleaner.module \cleaner_cron()
 
Implementation of hook_cron().
2 string references to 'cleaner_cron'
- cleaner_cleaner_settings in ./
cleaner.module  - Implementation of hook_cleaner_settings().
 - cleaner_uninstall in ./
cleaner.install  - Implementation of hook_uninstall().
 
File
- ./
cleaner.module, line 183  - Allows the admin to set a schedule for clearing caches and other stuff.
 
Code
function cleaner_cron() {
  $interval = variable_get('cleaner_cron', 3600);
  $last = variable_get('cleaner_last_cron', 0);
  $now = time();
  if ($now >= $last + $interval) {
    $ret = module_invoke_all('cleaner_run');
  }
  variable_set('cleaner_last_cron', $now);
}