You are here

function civicrm_cron_passthrough in CiviCRM Cron 7.2

1 string reference to 'civicrm_cron_passthrough'
civicrm_cron_menu in ./civicrm_cron.module
Implementation of hook_menu().

File

./civicrm_cron.module, line 141
CiviCRM Cron Module

Code

function civicrm_cron_passthrough() {
  if (!civicrm_initialize()) {

    //watchdog('civirm_cron', t('Failed to initialize CiviCRM during Cron'), NULL, WATCHDOG_ERROR);
    return t('Failed to initialize CiviCRM during Cron');
  }
  if (variable_get('civicrm_cron_username', NULL)) {
    CRM_Utils_System::authenticateScript(TRUE, variable_get('civicrm_cron_username', NULL), variable_get('civicrm_cron_password', NULL));
  }
  else {
    CRM_Utils_System::authenticateScript(FALSE);
  }
  require_once 'CRM/Core/JobManager.php';
  $facility = new CRM_Core_JobManager();
  return $facility
    ->execute();
}