Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
GRAILS-8921: Support for Scheduling via Spring's @Scheduled annotation #2216
Original Reporter: sothmann
I'd like to see support for Spring's @scheduled annotation in Grails services.
Currently Grails 2.0.1 seems to not support @scheduled annotation in services.
At my company, have been using @scheduled in a grails application that was running on 3.1.0.RC2. Recently it stopped working after attempting to upgrade to 3.1.9. Further investigation indicates that @scheduled stopped working in 3.1.7. I was considering creating an issue to get some feedback on the problem from a grails perspective, but this looks too closely related for a new issue.
I've dug through things a little and noticed that 3.1.7 includes an upgrade from Spring Boot 1.3.3 to 1.3.5. Somewhere in the Spring Boot 1.3.4 changes they updated to Spring Framework 4.2.6. That's about as far as I've gotten.
Using @scheduled does make scheduling tasks way simpler, so I'd like to see this supported.
On services indeed. I will give that a try in a moment.
Side note, I tried creating a sample app , and neither with 3.1.6 nor 3.1.0.RC2 was I able to get @scheduled working out of the box. It would take a while to figure out what of the things we've done in our app makes the difference, but it appears there is something.
I was able to get the code written. However, I'm still having trouble creating a basic sample app that works with @scheduled, and our app that is using @scheduled in the service is giving me trouble that appears associated with switching from 3.1.x to 3.2.x.
Regardless I wanted to get the code out so that (a) I can learn and (b) you have something to work with.