function cleaner_cron in Cleaner 7
Same name and namespace in other branches
- 8.2 cleaner.module \cleaner_cron()
- 8 cleaner.module \cleaner_cron()
- 5 cleaner.module \cleaner_cron()
- 6 cleaner.module \cleaner_cron()
Implements hook_cron().
3 string references to 'cleaner_cron'
- cleaner_cleaner_settings in ./
cleaner.module - Implements hook_cleaner_settings().
- cleaner_uninstall in ./
cleaner.install - Implements hook_uninstall().
- hook_cleaner_settings in ./
cleaner.api.php - Create Cleaner settings form.
File
- ./
cleaner.module, line 188 - Allows the admin to set a schedule for clearing caches and other stuff.
Code
function cleaner_cron() {
$interval = variable_get('cleaner_cron', 0);
$last = variable_get('cleaner_last_cron', 0);
if (REQUEST_TIME >= $last + $interval) {
module_invoke_all('cleaner_run');
}
variable_set('cleaner_last_cron', REQUEST_TIME);
}