报错信息如下:

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

Spring Scheduled定时任务报错 java.lang.IllegalStateException: Encountered invalid @Scheduled method 'xxx': For input string: "2S"的更多相关文章

  1. Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]

    1 报错描述 java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @Boot ...

  2. 云笔记项目- 上传文件报错"java.lang.IllegalStateException: File has been moved - cannot be read again"

    在做文件上传时,当写入上传的文件到文件时,会报错“java.lang.IllegalStateException: File has been moved - cannot be read again ...

  3. eclipse启动报错java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' befo

    报错: java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invo ...

  4. 解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level

    解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level 学习了:https://blog.csdn. ...

  5. springboot测试启动报错java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test

    springboot测试启动报错: java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you ne ...

  6. spring mvc处理http请求报错:java.lang.IllegalStateException: getInputStream() has already been called for this request

    发送post请求到controller处理失败,报错日志如下: java.lang.IllegalStateException: getInputStream() has already been c ...

  7. springboot 启动报错 java.lang.IllegalStateException: Failed to introspect annotated methods on class org

    . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ...

  8. spring低版本报错:java.lang.IllegalStateException: Context namespace element ‘annotation-config’ and its parser class [*] are only available on

    参考来源:http://blog.csdn.net/sunxiaoyu94/article/details/50492083 使用spring低版本(2.5.6),使用jre 8发现错误: Unexp ...

  9. Idea 的Test测试报错:java.lang.IllegalStateException: Failed to load ApplicationContext

    因为在Test里面使用了注解@Autowired 引入来至bean.xml文件的内容 ,而在Test没有没有办法自动引入,需要在Test类上加上注解 @ContextConfiguration(loc ...

随机推荐

  1. Linux背背背(6)

    目录 1.用户 2.用户组 3.权限设置 用户管理 添加用户 命令:useradd 语法:#useradd 用户名 所有的用户添加之后都会存储在一个文件中,会存储在passwd文件中,位置位于/etc ...

  2. Chapter07 链表(下):如何轻松学出正确的链表代码?

    技巧一:理解指针或引用的含义 技巧二:指针丢失和内存泄漏 技巧三:利用哨兵简化实现难度 技巧四:重点留意边界条件处理 如果链表未空时,代码是否能够正常运行 如果链表只包含一个节点时,代码能否正常运行 ...

  3. On-die termination for DDR

    本文转载自: https://blog.csdn.net/weixin_38233274/article/details/81016870 ODT是什么鬼?为什么要用ODT?在很多关于DDR3的博文和 ...

  4. Webdriver+Testng实现测试用例失败自动截图功能

    testng执行测试用例的时候,如果用例执行失败会自动截图,方便后续排查问题 1.首先定义一个截图类: package com.rrx.utils; import java.io.File;impor ...

  5. JSON.stringify()的深度使用

    在使用JSON.stringify()对JSON数据进行序列化时 1> 如果里面的属性是function,则会被忽略 const data = { a: 'a', fn: funciton() ...

  6. java.lang.IllegalArgumentException: Document base XXX does not exist or is not a readable directory解决方法

    一.配置Eclipse,部署项目 1.双击打开Tomcat设置页面 2.选择Modules模式 3.选择Add External Web Module.. (1)Document base:选择htd ...

  7. hadoop单机模式安装流程

    这里的安装是在Linux系统上安装的 参考博客 : https://blog.csdn.net/cafebar123/article/details/73500014 https://blog.csd ...

  8. js 字符串操作方法

    1.字符串转换 你可以将任何类型的数据都转换为字符串,你可以用下面三种方法的任何一种: 1 2 var num= 19; // 19 var myStr = num.toString(); // &q ...

  9. 关于总结一些CentOS7常用的运维命令

    Centos7日常需要用的运维命令 1.删除0字节文件 find-type f -size 0 -exec rm -rf {} \ 2.查看进程 按内存从大到小排列 ps -e   -o " ...

  10. rest_famework 增删改查初第四阶段(最高级,此阶段是优化第三阶段的代码)的使用

    两个url 共用一个视图 url url(r'^books/$', views.BookViewSet.as_view({"get":"list"," ...