You are here

function civicrm_cron_cron in CiviCRM Cron 6

Same name and namespace in other branches
  1. 8 civicrm_cron.module \civicrm_cron_cron()
  2. 7.2 civicrm_cron.module \civicrm_cron_cron()
  3. 7 civicrm_cron.module \civicrm_cron_cron()

File

./civicrm_cron.module, line 45
Civicrm Cron Module Uses _cron for drupals cron job to trigger civicrm's new Consolidated Cron Jobs used by Visions Service Adventures website

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 ( !$civi_cron_user || !$civi_cron_pass || !$civi_cron_key) return;

  //print_r($url);
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  $output = curl_exec($ch);
  curl_close($ch);
}