You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2020/04/27 15:49:48 UTC

[GitHub] [incubator-dolphinscheduler] samz406 commented on issue #2540: [BUG] update crontab task error (更新定时任务时错误)

samz406 commented on issue #2540:
URL: https://github.com/apache/incubator-dolphinscheduler/issues/2540#issuecomment-620070564


   hello
     According to your screenshot, the short time you choose is 2020-04-27 23:56:00 to 2020-04-27 23:56:02
   cron expression is 0 0 * * *? *, It can be judged that the cron expression is executed once every hour. Then, according to your start time, the next execution time should be 2020-04-28 00:00:00, and your end time period is 2020-04-27 23:56:02, which is less than the next execution time . So adding Quartz job will fail. That is, the online failed.
   
   **Solution**
   1 You can adjust the end time period. Just include the next execution time of cron within the start and end time period.
   
   2 When modifying the timing, set the "execution time" button to calculate the next five execution times. If there is data, the timing setting is correct, otherwise there is a problem with the timing setting.
   
   
   根据你的截图,你选的时间短是2020-04-27 23:56:00 到 2020-04-27 23:56:02 
   cron 表达式为 0 0 * * * ? *,可以判断cron表达式是一小时执行一次。如果按照你的的开始时间,下一次执行执行时间应该是2020-04-28 00:00:00,而你的结束时间段是 2020-04-27 23:56:02 ,小于下一次执行时间。所以添加Quartz job就会失败。也就是上线失败。
   
   **解决办法**
   1 你可以调整结束时间段。只要要包含cron下一次执行时间在起止时间段内。
   
   2 在修改定时,单击“执行时间”按钮,可以计算接下来五次执行时间,如果有数据那么定时设置正确,否则定时设置就有问题。
   
   ![image](https://user-images.githubusercontent.com/3055810/80392079-42ebf300-88e1-11ea-897c-7043dae65caa.png)
   
   
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org