Priority of execution of hooks in different modules
The system table has a 'weight' field. The hooks are executed in that order.

You can change during install with this code:

function your_module_name_install() {
  db_update('system')
    -&gt;fields(array('weight' =&gt; your_preferred_weight))
    -&gt;condition('name', '[your_module_name]', '=')
    -&gt;execute();
}


Source: https://www.drupal.org/node/110238