You are here

function nodeviewcount_cron in Node view count 7

Same name and namespace in other branches
  1. 8 nodeviewcount.module \nodeviewcount_cron()
  2. 7.3 nodeviewcount.module \nodeviewcount_cron()
  3. 7.2 nodeviewcount.module \nodeviewcount_cron()

Implements hook_cron().

File

./nodeviewcount.module, line 120

Code

function nodeviewcount_cron() {
  $flush_log_timer = variable_get('nodeviewcount_flush_log_timer', 0);
  if ($flush_log_timer > 0) {
    db_delete('nodeviewcount')
      ->condition('timestamp', REQUEST_TIME - $flush_log_timer, '<')
      ->execute();
  }
}