function update_cron in Drupal 6
Same name and namespace in other branches
- 8 core/modules/update/update.module \update_cron()
- 7 modules/update/update.module \update_cron()
- 9 core/modules/update/update.module \update_cron()
- 10 core/modules/update/update.module \update_cron()
Implementation of hook_cron().
File
- 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…
Code
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();
}
}