function message_digest_cron in Message Digest 8
Same name and namespace in other branches
- 7 message_digest.module \message_digest_cron()
Implements hook_cron().
Aggregate, format and and queue digests for sending.
File
- ./
message_digest.module, line 17 - Hook implementations for the Message Digest module.
Code
function message_digest_cron() {
/** @var \Drupal\message_digest\DigestManagerInterface $digest_manager */
$digest_manager = \Drupal::service('message_digest.manager');
// Process message digests.
$digest_manager
->processDigests();
// Cleanup old messages.
$digest_manager
->cleanupOldMessages();
}