Spring-Schedule

1
2
3
4
5
6
7
8
9
10
11
12
13
@Component
public class TestSchedule {
@ScheduleAnnotaion(serviceId = "DataSync", scheduleDesc = "数据同步", checkIntervalTime = 30, isSignalExecuteFlag = true, addHisTaskTableFlag = false)
@Scheduled(cron = "0 * * * * ?") // 每1分钟执行一次

public void executeSchedule() throws ResponseException {
executeScheduleNow();
}

public void executeScheduleNow() {
//todo 需要添加的操作
}
}