Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

加上数组下标,否则影响Crontab类的do_something方法 #17

Closed
wants to merge 1 commit into from
Closed

Conversation

ouminghai
Copy link
Contributor

这里返回的数组没有下标,导致问题挺多的。

@osgochina
Copy link
Owner

这里没有问题,同一时间可以运行多个同样的任务,是为了消除定时器的误差而设置的。所以你的修改是有误的,我不能合并

@osgochina osgochina closed this Jan 27, 2016
@ouminghai
Copy link
Contributor Author

比如
任务A */1 * * * * *
任务B */3 * * * * *

任务A执行时间3秒,且设置unique=1
如果按你的逻辑,只读到B的时候,下标为0.但是刚才A执行需要3秒,导致B无法执行

@osgochina
Copy link
Owner

你理解有偏差,到了获取任务的时候,已经是无时间状态了,只要是到了事件的任务都会执行,这个下标不是用用来区别时间的,你可以理解为array_push

osgochina added a commit that referenced this pull request Jan 27, 2016
@osgochina
Copy link
Owner

谢谢你,是我的失误,已经修复了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants