This question already has an answer here:
I need to do a few things which could be easily made with Drush commands, but I need to achieve them through PHP code inside my module, on an
It seems to me that I need to use
drush_invoke() but it doesn't currently exists when I tested in a devel block. I searched here and there how to include (safely) this function, but I had no luck on that.
I guess it is simple and my question could sound silly.
How can I use
drush_invoke() in my code called from