function watchdog_cron in Drupal 4
Same name and namespace in other branches
- 5 modules/watchdog/watchdog.module \watchdog_cron()
Implementation of hook_cron().
Remove expired log messages and flood control events.
File
- modules/
watchdog.module, line 58 - System monitoring and logging for administrators.
Code
function watchdog_cron() {
db_query('DELETE FROM {watchdog} WHERE timestamp < %d', time() - variable_get('watchdog_clear', 604800));
db_query('DELETE FROM {flood} WHERE timestamp < %d', time() - 3600);
}