1.20.x dashboard.module | dashboard_cron() |
Implements hook_cron().
File
- modules/
dashboard/ dashboard.module, line 259 - 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);
}
}