I'm working on a existing micronaut application with groovy and gradle, which has a scheduler and is expected to run every 1 minute. Somehow the scheduler doesn't run at all, neither does the application throw any error (just stays silent). I don't see any reason why it shouldn't but i'm a newbie to micronaut and i might be missing something. Any pointer is appreciated, stuck with this issue from a long time now. Here is the scheduler class.
@CompileStatic
@Singleton
@Requires(notEnv = "test")
class CsmTestJob {
private final CsmTestJobExecutor csmTestJobExecutor
CsmTestJob(CsmTestJobExecutor csmTestJobExecutor) {
this.csmTestJobExecutor = csmTestJobExecutor
}
@Scheduled(fixedDelay = '${feature.job.execute}')
void executeCsmTests() {
csmTestJobExecutor.executeCsmTests()
}
}
Here is the application.yml file
micronaut:
application:
name: csm
server:
port: 8080
host: 127.0.0.1
feature:
job:
execute: "1m"