You are here

function health_cron in Health Status 7

Implements hook_cron().

File

./health.module, line 90
Contains the basic hooks and function used by the Health system.

Code

function health_cron() {

  // Check to see if we need to send e-mails right now.
  $last_run = variable_get('health_cron_last', 0);
  $frequency = variable_get('health_email_frequency');
  if ($frequency !== "never" && ($frequency === "cron" || REQUEST_TIME - $frequency < $last_run)) {
    if (health_email_send()) {
      health_cron_email_send();
    }
  }
}