You are here

function progress_cron in Progress 8

Same name and namespace in other branches
  1. 6 progress.module \progress_cron()
  2. 7 progress.module \progress_cron()

Implements hook_cron().

Clean up finished progresses

File

./progress.module, line 172
Progress framework for keeping track of progresses

Code

function progress_cron() {
  return db_delete('progress')
    ->condition('end_stamp', 0, '>')
    ->condition('end_stamp', time() - \Drupal::config('progress.settings')
    ->get('progress_age'), '<')
    ->execute();
}