You are here

function feeds_cron in Feeds 6

Same name and namespace in other branches
  1. 8.3 feeds.module \feeds_cron()
  2. 8.2 feeds.module \feeds_cron()
  3. 7.2 feeds.module \feeds_cron()
  4. 7 feeds.module \feeds_cron()

Implements hook_cron().

Related topics

File

./feeds.module, line 28
Feeds - basic API functions and hook implementations.

Code

function feeds_cron() {
  if ($importers = feeds_reschedule()) {
    foreach ($importers as $id) {
      feeds_importer($id)
        ->schedule();
      $result = db_query("SELECT feed_nid FROM {feeds_source} WHERE id = '%s'", $id);
      while ($row = db_fetch_object($result)) {
        feeds_source($id, $row->feed_nid)
          ->schedule();
      }
    }
    feeds_reschedule(FALSE);
    return;
  }
}