function notifications_cron in Notifications 7
Same name and namespace in other branches
- 5 notifications.module \notifications_cron()
- 6.4 notifications.module \notifications_cron()
- 6 notifications.module \notifications_cron()
- 6.2 notifications.module \notifications_cron()
- 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();
}
}