You are here

function history_cron in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/history/history.module \history_cron()
  2. 9 core/modules/history/history.module \history_cron()

Implements hook_cron().

File

core/modules/history/history.module, line 131
Records which users have read which content.

Code

function history_cron() {
  \Drupal::database()
    ->delete('history')
    ->condition('timestamp', HISTORY_READ_LIMIT, '<')
    ->execute();
}