| 6 update.module | update_cron() |
| 7 update.module | update_cron() |
| 8 update.module | update_cron() |
Implements hook_cron().
File
- modules/
update/ update.module, line 288 - 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;
if ((REQUEST_TIME - variable_get('update_last_check', 0)) > $interval) {
// If the configured update interval has elapsed, we want to invalidate
// the cached data for all projects, attempt to re-fetch, and trigger any
// configured notifications about the new status.
update_refresh();
update_fetch_data();
_update_cron_notify();
}
else {
// Otherwise, see if any individual projects are now stale or still
// missing data, and if so, try to fetch the data.
update_get_available(TRUE);
}
// Clear garbage from disk.
update_clear_update_disk_cache();
}
Login or register to post comments