塔读定时任务_手动触发

时间:2021-09-12 07:52:16

@Controller

@RequestMapping(value="/admin/tadu")

public class TaDuController {

 

@Resource(name="taDuService")

private TaDuService taDuService;

 

@RequestMapping

@ResponseBody

public String taDuTask(){

if(TaDuServiceImpl.isRunning){

return "taDu task is running already!";

}else{

new Thread(new Runnable() {

@Override

public void run() {

taDuService.cpBookChapterChaseTask();

}

}).start();

return "taDu task is start!";

}

}

}