Reputation: 3
How can I pass cron and timezone dynamically in Spring Schedular
Upvotes: 0
Views: 321
Reputation: 2024
you can do it by passing corn expression from properties file
@Scheduled(cron = "${cron.expression}")
public void methodServicesDemo()
{
System.out.println("Method execute :: "+ new Date());
}
Upvotes: 1