|
@@ -0,0 +1,27 @@
|
|
|
|
|
+package com.malk.eastar.schedule;
|
|
|
|
|
+
|
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
|
|
|
+import org.springframework.context.annotation.Configuration;
|
|
|
|
|
+import org.springframework.scheduling.annotation.EnableScheduling;
|
|
|
|
|
+import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * 新的定时任务
|
|
|
|
|
+ */
|
|
|
|
|
+@Slf4j
|
|
|
|
|
+@Configuration
|
|
|
|
|
+@EnableScheduling
|
|
|
|
|
+@ConditionalOnProperty(name = {"enable.scheduling"})
|
|
|
|
|
+public class ScheduleTaskNew {
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 更新员工在职情况
|
|
|
|
|
+ */
|
|
|
|
|
+ @Scheduled(cron = "0 55 16 * * ?")
|
|
|
|
|
+ public void updateEmployeeStatus() {
|
|
|
|
|
+ log.info("更新员工在职情况");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+}
|