cronsun
cronsun copied to clipboard
为什么同一时间任务会执行两次
Please answer these questions before submitting your issue. Thanks! 在你提交 issue 前,请先回答以下问题,谢谢!
-
What version of Go and cronsun version are you using? 你用的是哪个版本的 Go 和 哪个版本的 cronsun? go version go1.11.5 和 v0.3.5 (build go1.11)
-
What operating system and processor architecture are you using (
go env
)? 你用的是哪个操作系统,什么架构的? linux/amd64 -
What did you do? If possible, provide a recipe for reproducing the error. A complete runnable program is good. 你做了什么,遇到了什么问题?尽可能描述清楚问题,最好把操作步骤写下来,按这些步骤操作后能重现你的问题。 在后台增加任务后, 从后台点立即执行,任务会执行两次。
-
What did you expect to see? 你期望得到什么样的结果? 只执行一次
-
What did you see instead? 现在你得到的结果是什么样的? 现在同一时间任务会重复执行。
我也碰到了同样的问题,同一个任务再同一个节点执行了两次,两次执行时间相差了1S
我找到了原因, 是因为启动了两个服务。