You are here

public function FeedsImporter::schedule in Feeds 6

Same name and namespace in other branches
  1. 7 includes/FeedsImporter.inc \FeedsImporter::schedule()

Schedule this importer.

File

includes/FeedsImporter.inc, line 83
FeedsImporter class and related.

Class

FeedsImporter
A FeedsImporter object describes how an external source should be fetched, parsed and processed. Feeds can manage an arbitrary amount of importers.

Code

public function schedule() {
  $job = array(
    'callback' => 'feeds_importer_expire',
    'type' => $this->id,
    'period' => 0,
    'periodic' => TRUE,
  );
  if (FEEDS_EXPIRE_NEVER != $this->processor
    ->expiryTime()) {
    $job['period'] = 3600;
    job_scheduler()
      ->set($job);
  }
  else {
    job_scheduler()
      ->remove($job);
  }
}