You are here

function notifications_cron in Notifications 7

Same name and namespace in other branches
  1. 5 notifications.module \notifications_cron()
  2. 6.4 notifications.module \notifications_cron()
  3. 6 notifications.module \notifications_cron()
  4. 6.2 notifications.module \notifications_cron()
  5. 6.3 notifications.module \notifications_cron()

Implementation of hook_cron()

Keep logs clean

File

./notifications.module, line 1397
Notifications module

Code

function notifications_cron() {
  if ($log_time = variable_get('notifications_event_log', NOTIFICATIONS_EVENT_LOG)) {
    db_delete('notifications_event')
      ->condition('log', 1)
      ->condition('created', REQUEST_TIME - $log_time, '<')
      ->execute();
  }
}