import org.springframework.context.ApplicationContext;
import org.springframework.core.SpringVersion;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
@EnableWebMvc
@Log4j2
@EnableJpaRepositories("hu.user.mcvodsync.db.repository")
@SpringBootApplication(scanBasePackages = {"hu.user.mcvodsync"})
-
+@EnableScheduling
public class VodSyncEntry extends SpringBootServletInitializer {
--- /dev/null
+package hu.user.mcvodsync.service.schedule;
+
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Service;
+
+@Service
+public class TaskSchedules {
+
+ @Scheduled(fixedDelay = 5000)
+ public void scheduleFixedDelayTask() {
+ System.out.println(
+ "Fixed delay task - " + System.currentTimeMillis() / 1000);
+ }
+}