You are here

function visitors_cron in Visitors 7.0

Same name and namespace in other branches
  1. 8.2 visitors.module \visitors_cron()
  2. 8 visitors.module \visitors_cron()
  3. 7.2 visitors.module \visitors_cron()
  4. 7 visitors.module \visitors_cron()

Implements of hook_cron().

File

./visitors.module, line 223

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();
  }
}