civicrm_cron.module in CiviCRM Cron 8
Same filename and directory in other branches
CiviCRM Cron Module.
File
civicrm_cron.moduleView source
<?php
/**
* @file
* CiviCRM Cron Module.
*/
/**
* Implements hook_cron().
*/
function civicrm_cron_cron() {
/** @var \Drupal\civicrm_cron\CronRunner $runner */
$runner = \Drupal::service('civicrm_cron.cron_runner');
/** @var \Psr\Log\LoggerInterface $logger */
$logger = \Drupal::logger('civicrm_cron');
try {
$runner
->runCron();
$logger
->notice(t('CiviCRM Cron: Successfully Run'));
} catch (\Exception $e) {
$logger
->error(t('CiviCRM Cron:') . ' ' . $e
->getMessage());
}
}
Functions
Name | Description |
---|---|
civicrm_cron_cron | Implements hook_cron(). |