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

Update cronTrigger.js #4

Merged
merged 1 commit into from
Jun 5, 2014
Merged

Update cronTrigger.js #4

merged 1 commit into from
Jun 5, 2014

Conversation

gitig
Copy link
Contributor

@gitig gitig commented Jun 4, 2014

当下一个任务的执行时间跨月的时候,如果本月的最大天数大于下月的最大天数,Date.setMonth()会把月份改成下下个月,所以先执行Date.setDate(),再执行Date.setMonth(),可以保证跨月的时候不会跳月

当下一个任务的执行时间跨月的时候,如果本月的最大天数大于下月的最大天数,Date.setMonth()会把月份改成下下个月,所以先执行Date.setDate(),再执行Date.setMonth(),可以保证跨月的时候不会跳月
py8765 added a commit that referenced this pull request Jun 5, 2014
Update cronTrigger.js
@py8765 py8765 merged commit ca24a93 into NetEase:master Jun 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants