【发布时间】:2019-07-04 23:41:33
【问题描述】:
我想每隔 2 分钟运行一次 cron,0,2,4,6,8 .... 每个 cron 执行运行 2 分钟。
我如下配置了同步的 cron 计划。但我仍然看到调度程序的行为好像没有给出同步。
Cron 计划在
0-2 第一个定时任务
4-6 秒 cron
8-10 第三个 cron
Cron 调度程序在上次 cron 执行后等待 2 分钟。
如果我对同步的理解正确,添加它是为了避免这种行为。
为什么会这样。
<cron>
<url>/cron/syncPrices</url>
<description>Fetch data from source and cache it in data store.</description>
<schedule>every 2 minutes synchronized</schedule>
</cron>
【问题讨论】: