I have three importers set up and working fine; all creating nodes from an XML file using HTTP fetcher.
The created nodes reference each other (using Node Reference), so the importers must run in a certain order.
To automate this, I'm not using the periodic import option as it won't keep things in sync. Instead, I created a simple Rules action:
<?php
function my_import_action_import($importer_name, $feeds_node) {
while (FEEDS_BATCH_COMPLETE != feeds_source($importer_name, $feeds_node)->import());
}
?>
Then I created a rule that runs on cron with three actions (one to trigger each importer).
As far as I can tell, it seems to work. But I get a warning notice that doesn't happen when I run the importers manually:
Notice: Undefined offset: 2 in references_feeds_set_target() (line 203 of /home/mysites/drupal7/sites/default/modules/references/references.feeds.inc).
I also have a feeling that Feeds was meant to use job scheduler for a reason, and not run on cron in this way?
Thanks!