spring scheduling a job with fixed delay and initial delay
I am trying to schedule a method call. I want to schedule this method call as soon as the server starts and then after every 30 seconds. Below code: @Configuration @EnableScheduling @EnableTransactionManagement public class Schedular implements SchedulingConfigurer { @Override public void configureTasks(ScheduledTaskRegistrar taskRegistrar) { taskRegistrar.setScheduler(poolScheduler()); taskRegistrar.addTriggerTask(new Runnable() { @Override public void run() { testScheduling(); } }, new Trigger() { @Override public Date nextExecutionTime(TriggerContext triggerContext) { Calendar nextExecution
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.