@Override public void configureTasks(ScheduledTaskRegistrar taskRegistrar) { taskRegistrar.setScheduler(taskScheduler()); taskRegistrar.addCronTask( new Runnable() { public void run() { rabbitCleanup().run(); } }, "0 00 07 * * ?"); }
@Override public void configureTasks(ScheduledTaskRegistrar taskRegistrar) { taskRegistrar.setTaskScheduler(taskScheduler); }