Skip to content

Commit

Permalink
issue #21
Browse files Browse the repository at this point in the history
  • Loading branch information
th-schwarz committed Mar 28, 2024
1 parent d5f14c3 commit a9f1744
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package codes.thischwa.dyndrest.service;

import java.time.LocalDateTime;
import java.util.concurrent.TimeUnit;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Profile;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

@Service
@EnableScheduling
@Profile("!test")
@Slf4j
@ConditionalOnProperty(name = "dyndrest.zone-updater-delay")
public class ZoneUpdaterService {

@Scheduled(fixedDelayString = "${dyndrest.zone-updater-delay}", timeUnit = TimeUnit.SECONDS)
void process() {
log.info("*** process: {}", LocalDateTime.now());
}
}

0 comments on commit a9f1744

Please sign in to comment.