Balaji Srinivasan
Balaji Srinivasan

Reputation: 11

Spring Boot Scheduler not triggered at Scheduled Time

When I Schedule a Job for an email Trigger with Cron Expression in Application Properties, email is not trigger and each Time when I stop the Tomcat and reconfigure the Time it is triggering the job.

Upvotes: 1

Views: 705

Answers (1)

S. Anushan
S. Anushan

Reputation: 788

Please verify you have configuration correctly. And trigger job for particular time you have to have method level configuration also as below.

@Configuration
@EnableScheduling
public class SpringConfig {

@Scheduled(cron = "0 0 0 0 * ?")
public void scheduleTaskUsingCronExpression() {

//Email trigger at 12 clock 
}
}

Upvotes: 1

Related Questions