Schedule Migrate to import XML data regularly Is it possible to schedule Migrate to import/update my XML regularly, say, once an hour? Maybe in Rules?

EDIT: I have a skeleton of a module written for this now, to hook into Rules. 

Event: If there are unimported nodes, or if it has been more than 15 minutes since the last import

Condition: Just the machine name of the Migration, and its enddate timestamp

Actions: I want two, one to do an import and rollback, and another to update and import. 

I am having trouble trying to find what functions to call to initiate the actions, and which ones to get my arguments. Is there any good documentation on the core Migrate functions (not field handlers or anything) so that I can see which ones I need?

EDIT 2
I ended up with this cron function. Is this how it's written? And I can put it into my module where the rest of my migration is? I also need to specify that it should update any nodes already imported. How do I do that?

    function mymodule_cron() {
            $last_run = variable_get('mymodule_last_cron', 0);
            $interval = variable_get('mymodule_interval', 60);
            if(time() - $last_run &gt; $interval){
                 variable_set('mymodule_last_cron', time());
                 $migration = Migration::getInstance('ImportNodes');
                 $result = $migration-&gt;processImport();
            }
     }
I think the best way to achieve your goal is to use Drupal's cron, not Rules.

Cron is a service that will trigger the execution of a function, depending on the frequency you want it to.

You just have to implement hook_cron in your custom module to execute your migration. You will have to take care of the frequency you need for your script. I found this example useful.

How to run migration programmatically? As stated here, it's very simple:

&lt;?php
  $migration = Migration::getInstance($machine_name);
  $result = $migration-&gt;processImport();
?&gt;