You are here

function evercurrent_cron in Evercurrent 7.2

Same name and namespace in other branches
  1. 8.2 evercurrent.module \evercurrent_cron()
  2. 8 evercurrent.module \evercurrent_cron()
  3. 7 evercurrent.module \evercurrent_cron()

Implements hook_cron().

File

./evercurrent.module, line 104
evercurrent.module

Code

function evercurrent_cron() {
  if (variable_get('evercurrent_send', FALSE)) {

    // Check if we are to send updates now.
    $last_run = variable_get(RMH_LAST_TRY, 0);
    $interval = variable_get('evercurrent_interval', 3600);

    // Check if last run plus interval is earlier than now
    if ($last_run + $interval < time()) {
      module_load_include('inc', 'evercurrent', 'evercurrent.send');
      evercurrent_run_update_check();
    }
  }
}