xuxueli / xxl-job

A distributed task scheduling framework.(分布式任务调度平台XXL-JOB)
http://www.xuxueli.com/xxl-job/
GNU General Public License v3.0
27.45k stars 10.86k forks source link

cron配置的时间与实际执行时间不符 #204

Closed libraice closed 6 years ago

libraice commented 6 years ago

Please answer some questions before submitting your issue. Thanks!

Which version of XXL-JOB do you using?

 1.8.2

Expected behavior

 凌晨2点执行任务

Actual behavior

  早上10点执行任务

Steps to reproduce the behavior

 用注解JobHander实现了任务
 在xxl-job-admin配置了凌晨2点执行的任务,cron(0 0 2 * * ? )
 执行器是自己注册上来的,但是日志显示实际是早上10点执行的

7a053e05-cb7e-4c0d-b192-239633241c98 b86b3579-e92a-424e-81ef-51732dc2ca49

Other information

sjby365 commented 6 years ago

看下系统时间和时间格式

libraice commented 6 years ago

多谢

xbeginagain commented 6 years ago

最终是什么原因呢?

sjby365 commented 6 years ago

我之前遇到过一次时区问题 估计上面也是 2点到10点正好相差8小时

xuxueli commented 6 years ago

@sjby365 +1,是时区问题,这个问题在社区群有朋友指出过。机器保持时区与时钟一致即可。

reflyhight commented 6 years ago

Tomcat也有个时区,需要注意