You are here

function spam_cron in Spam 6

Same name and namespace in other branches
  1. 5.3 spam.module \spam_cron()
  2. 5 spam.module \spam_cron()

Drupal _cron hook.

File

./spam.module, line 439
Spam module, v3 Copyright(c) 2006-2008 Jeremy Andrews <jeremy@tag1consulting.com>. All rights reserved.

Code

function spam_cron() {

  // Delete expired logs.
  if ($flush = variable_get('spam_log_delete', 259200)) {
    db_query('DELETE FROM {spam_log} WHERE timestamp < %d', time() - $flush);
  }
}