function civicrm_cron_cron in CiviCRM Cron 7
Same name and namespace in other branches
- 8 civicrm_cron.module \civicrm_cron_cron()
- 6 civicrm_cron.module \civicrm_cron_cron()
- 7.2 civicrm_cron.module \civicrm_cron_cron()
Implementation of hook_cron().
File
- ./
civicrm_cron.module, line 101 - CiviCRM Cron Module
Code
function civicrm_cron_cron() {
$cron_values['name'] = variable_get('civicrm_cron_username', NULL);
$cron_values['pass'] = variable_get('civicrm_cron_password', NULL);
$cron_values['key'] = variable_get('civicrm_cron_sitekey', CIVICRM_SITE_KEY);
$url = civicrm_cron_get_url($cron_values);
if ($url) {
$result = drupal_http_request($url);
//look for the CiviCRM error in response... successful processing returns nothing
if ($result->data) {
watchdog('civirm_cron', $result->data);
}
else {
watchdog('civirm_cron', t('CiviCRM Cron Successfully Run'));
}
}
}