We have spring boot app, which contains the one method annotated with @Scheduled
, in a class. I created jar file from this spring boot app and added this as dependency in another spring boot application, when I started this second main spring boot application, I expected the method annotated with @Scheduled
, to execute every minute (I configured like in that application.yml of the first spring boot app). But this not running like this. When I tested the first spring boot app along as app, it is working method is invoked every 1 minute, can any one help why the same method not working when I added as jar to another spring boot app.
Note : the second main spring boot app, does not contain any more classed expect one class annotated with
@SpringBootApplication
@EnableScheduling
can anyone please suggest why this is not working ?