报错信息如下:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dingTalkMessagePump' defined in file [F:workspaceNEWSRCWebContentWEB-INFclassesartifactsERP_Web_explodedWEB-INFclassescomxxxsoftprojectmanageutilsDingTalkMessagePump.class]: Initialization of bean failed; nested exception is java.lang.IllegalStateException: Encountered invalid @Scheduled method 'gzyqtjList': For input string: "2S"
错误代码
/*** * 每周2-6早上上班前(08:00)统计任务有延期的员工,并发送通知 */ @Scheduled(cron = "0 0 8 ? * TUES-SAT") public void gzyqtjList() {
正确代码
/*** * 每周2-6早上上班前(08:00)统计任务有延期的员工,并发送通知 */ @Scheduled(cron = "0 0 8 ? * TUE-SAT") public void gzyqtjList() {
周二用TUE而不是TUES