de.otto.edison.status.scheduler.CronScheduler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of edison-core Show documentation
Show all versions of edison-core Show documentation
Core library for all Edison libraries.
package de.otto.edison.status.scheduler;
import de.otto.edison.status.indicator.ApplicationStatusAggregator;
import org.springframework.scheduling.annotation.Scheduled;
public class CronScheduler implements Scheduler {
private final ApplicationStatusAggregator aggregator;
public CronScheduler(final ApplicationStatusAggregator aggregator) {
this.aggregator = aggregator;
}
@Scheduled(cron = "${edison.status.scheduler.cron}")
public void update() {
aggregator.update();
}
}