Grails Invoke a controller method from a scheduled job
-
31-10-2019 - |
Question
in my grails application i'd like to invoke from a scheduled job class a method contained in a controller.
Reading this [http://www.grails.org/Job+Scheduling+(Quartz)], I can see that datasources and services are auto-wired by name in job classes. It seems this is not possible for controllers by default, probably 'cause controllers aren't supposed to do this kind of stuff.
BTW, is there a way to get a controller method called from a job in grails? And could this be such a bad practice to you (and why)?
Thanks in advance, Luca
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow