ZhjTask.java
1002 Bytes
package com.pashanhoo.common;
import com.pashanhoo.zhj.service.ZhjDatasSynService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
@Configuration
@EnableScheduling
public class ZhjTask {
@Autowired
private ZhjDatasSynService zhjDatasSynService;
//@Scheduled(cron="0 0 21 * * ? ")
public void execute() {
System.out.println("===========每天晚上九点定时任务进来了=========");
zhjDatasSynService.send_bdcYwInfo();
System.out.println("===========每天晚上九点定时任务走了=========");
}
//@Scheduled(cron="0 0 21 * * ? ")
public void executeQyInfo() {
System.out.println("===========每天晚上九点定时任务进来了=========");
zhjDatasSynService.synQyInfo();
System.out.println("===========每天晚上九点定时任务走了=========");
}
}