You are here

function shoutbox_cron in Shoutbox 5

Same name and namespace in other branches
  1. 6.2 shoutbox.module \shoutbox_cron()
  2. 6 shoutbox.module \shoutbox_cron()
  3. 7.2 shoutbox.module \shoutbox_cron()
  4. 7 shoutbox.module \shoutbox_cron()

Implementation of hook_cron().

File

./shoutbox.module, line 139
shoutbox module displays a block for users to create short messages for thw whole site. Uses AHAH to update the database and display content.

Code

function shoutbox_cron() {
  $expiration = variable_get('shoutbox_expire', 0);
  if ($expiration > 0) {
    db_query('DELETE FROM {shoutbox} WHERE created < %d', time() - 60 * 60 * 24 * $expiration);
  }
}