1 dashboard.module dashboard_cron()

Implements hook_cron().

File

core/modules/dashboard/dashboard.module, line 258
Provides an administrative dashboard.

Code

function dashboard_cron() {
  $last_news_fetch = state_get('dashboard_news_timestamp');
  $fetch_interval = 21600; // 6 hours.
  if (REQUEST_TIME - $last_news_fetch > $fetch_interval) {
    DashboardNewsBlock::refreshNewsFeed();
    state_set('dashboard_news_timestamp', REQUEST_TIME);
  }
}