How to make scheduled Feeds importers run consecutively? I have two Feeds importers that need to run in a specific order. For example:

1) Importer 'Films' imports all the films showing at a cinema, creating 'film' nodes.

2) Importer 'Showtimes' imports the show times for each film, creating 'showtime' nodes. 

Both importers are scheduled to run every day. 'Showtimes' must always run after 'Films' is fully imported, as it creates node references to film nodes. 

Things I have tried:

Using Rules instead of Job Scheduler. I created a custom rules action using this code:

while (FEEDS_BATCH_COMPLETE != feeds_source('my_importer_id', $node-&gt;nid)-&gt;import());


I created a rule that triggers on cron with two actions: import films, import showtimes. This kind of works but when I look at the newly created nodes, showtime nodes are being generated before all the film nodes are created. So I guess rules actions aren't processed sequentially...?

Using Feeds Rules to chain one import onto another. Feeds Rules provides a 'after Feeds import' rules event. 

So I tried creating a rule that triggers 'showtimes' importer (using my custom action above) after 'films' importer has run. But I ran into a problem applying a condition on the rule provided by the module. I'm not convinced this is the best method anyway.

Thanks
You've entered that territory where you would be better served by a custom module than trying to force Rules to do what you want.

If I were posed with this problem I would do the following:


Create two CRON jobs one for each of the importers in a new module. See hook_cron().
Turn off all of Feeds default importing for those feeds.
Install Elysia Cron.
Schedule your cron jobs with Elysia to run at appropriate intervals leaving enough
time for the first to complete before running the second. 
For extra credit you could programatically check that the first import is
complete before allowing the second to run.