1 redirect.module | redirect_cron() |
Implements hook_cron().
File
- core/
modules/ redirect/ redirect.module, line 296
Code
function redirect_cron() {
// Throttle to only once every 6 hours.
$last_run = state_get('redirect_cron_last', 0);
$interval = 21600;
if ($last_run + $interval < REQUEST_TIME) {
// Purge inactive self-managed redirects from the database.
redirect_purge_inactive_redirects();
state_set('redirect_cron_last', REQUEST_TIME);
}
}