I have a module with additional (.inc) files containing functions I need to run via Drush. I know it is possible to run drush eval
, but when I try to do it for those functions I get the following error:
PHP Fatal error: Call to undefined function my_module_my_function() in /usr/share/php/drush/commands/core/core.drush.inc(1037) : eval()'d code on line 1
This command works (the function is in the .module file).
drush eval 'my_module_cron();'
This command does not work (the function is in the .inc file).
drush eval 'my_module_my_function();'
Is there any workaround, besides moving the function in the module?