function hosting_cron_get_sites in Hosting 6.2
Same name and namespace in other branches
- 5 cron/hosting_cron.module \hosting_cron_get_sites()
Get a number of sites that need to have cron executed.
Parameters
$limit: Limit to a maximum of this number of sites.
Return value
An array of site nodes that need to have cron executed.
Deprecated
function unused
File
- cron/
hosting_cron.module, line 94 - Allow the hosting system to cron all the installed sites on a schedule.
Code
function hosting_cron_get_sites($limit = 5) {
$result = db_query("SELECT n.nid FROM {node} n LEFT JOIN {hosting_site} s ON n.nid=s.nid WHERE n.type='site' and s.status = %d ORDER BY s.last_cron ASC, n.nid ASC limit %d", HOSTING_SITE_ENABLED, $limit);
while ($nid = db_fetch_object($result)) {
$sites[$nid->nid] = node_load($nid->nid);
}
return $sites;
}