You are here

function webform_cron in Webform 8.5

Same name and namespace in other branches
  1. 6.x webform.module \webform_cron()

Implements hook_cron().

File

./webform.module, line 182
Enables the creation of webforms and questionnaires.

Code

function webform_cron() {
  $config = \Drupal::config('webform.settings');
  \Drupal::entityTypeManager()
    ->getStorage('webform_submission')
    ->purge($config
    ->get('purge.cron_size'));
}