报错信息如下:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dingTalkMessagePump' defined in file [F:\workspace\NEWSRC\WebContent\WEB-INF\classes\artifacts\ERP_Web_exploded\WEB-INF\classes\com\xxx\softprojectmanage\utils\DingTalkMessagePump.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

posted on 2019-03-05 09:55  你不知道的浪漫  阅读(4223)  评论(0编辑  收藏  举报