0

I have feature togglz in my spring boot application. There are some features which are successfully work for the moment. So now I need to do some operation right in the time when one of my feature is activated. Is there any way to do that?

2 Answers2

0

By using Spring Scheduling you can resolve your problem.

step 1: Enable scheduling for this annotation @EnableScheduling at class level

step 2: You can use any pattern like, hourly, minute, fixed delay,..etc.

@Scheduled(fixedRate = 10000)
@Scheduled(cron = "0 * * * * MON-FRI")`enter code here`
void checTogglzk() {
   // ...
 }
ranjith
  • 369
  • 1
  • 9
0

I would implement Custom ActivationStrategy and call your method within it. Example how to do it in toggz doc: https://www.togglz.org/documentation/activation-strategies.html

David Levin
  • 344
  • 1
  • 8