function visitors_cron in Visitors 7.2
Same name and namespace in other branches
- 8.2 visitors.module \visitors_cron()
- 8 visitors.module \visitors_cron()
- 7 visitors.module \visitors_cron()
- 7.0 visitors.module \visitors_cron()
Implements hook_cron().
File
- ./
visitors.module, line 235
Code
function visitors_cron() {
$visitors_flush_log_timer = variable_get('visitors_flush_log_timer', 0);
if ($visitors_flush_log_timer > 0) {
// Clean up expired access logs.
db_delete('visitors')
->condition('visitors_date_time', time() - $visitors_flush_log_timer, '<')
->execute();
}
}