I am developing a module which resides in the third_party directory of my expression engine install, which includes a public method which sends an email when called via cron. Currently the only way I can think to call this method is by setting up an action and calling it via the url.
Something like this;
This seems to be confirmed here as a valid approach.
The problem with this is that it breaks as soon as the module gets re-installed, as the action id will be regenerated.
So then I thought about making a template, which has an embedded call to my module method, and visiting the url of this template from my cron job. This is ok, but I don't like the idea of using templates for something that is not in any way a view.
What I would like to do, bearing in mind EE is built on an MCV framework, is use the codeigniter routing to call it. Something like;
But I don't know if this is possible, nor what the form of the url would be if it were possible.