Reputation: 1718
I have this SpringBoot app:
@SpringBootApplication
@EnableScheduling
@Import({SecurityConfig.class})
public class BlogsApplication implements CommandLineRunner {
..
}
and I also have this class,
@Component
public class UptadeCurrencyJob1 {
@Scheduled(cron = "0 0/10 1 * * ?")
public void reportCurrentTime() throws IOException {
System.out.println("UptadeCurrencyJob1");
}
}
But it never calles
Upvotes: 0
Views: 137
Reputation: 32550
@Scheduled(cron = "0 0/10 1 * * ?")
Indeed, this is valid cron expresion meaning that it will fire every 10 minutes past midnight (for 1 hour only). I bet you did not wait that long nor you did mean that.
Upvotes: 2