function update_cron

Same name and namespace in other branches
  1. 7.x drupal-7.x/modules/update/update.module \update_cron()

Implementation of hook_cron().

Archivo

drupal-6.x/modules/update/update.module, line 295
The "Update status" module checks for available updates of Drupal core and any installed contributed modules and themes. It warns site administrators if newer releases are available via the system status report (admin/reports/status), the…

Código

function update_cron() {
  $frequency = variable_get('update_check_frequency', 1);
  $interval = 60 * 60 * 24 * $frequency;
  // Cron should check for updates if there is no update data cached or if the
  // configured update interval has elapsed.
  if (!_update_cache_get('update_available_releases') || ((time() - variable_get('update_last_check', 0)) > $interval)) {
    update_refresh();
    _update_cron_notify();
  }
}