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

bug fix: '* 23-7/1 * * *'表示'23点到7点间的每1个小时的任意分钟执行一次', 所以正确的写法应该是'0 23-… #22

Merged
merged 1 commit into from Dec 3, 2016

Conversation

lslxdx
Copy link

@lslxdx lslxdx commented Oct 17, 2016

文档的结构清晰,内容详细,排版优良,对我的帮助很大,感谢作者!

我在操作的时候遇到一个问题:

实验环境:
CentOS release 6.6 (Final)

如何复现:
cat >>/etc/crontab<<<'* 18-19/1 * * * root date>>/root/cron_test.txt'
while :; do tail -f /root/cron_test.txt; done;

输出如下:
Mon Oct 17 18:50:01 CST 2016
Mon Oct 17 18:51:01 CST 2016
Mon Oct 17 18:52:01 CST 2016
Mon Oct 17 18:53:01 CST 2016
Mon Oct 17 18:54:01 CST 2016

结论:
文中"* 23-7/1 * * *"没有"23点到7点每小时执行一次", 而是"23点到7点任意分钟执行一次", 这貌似是一个bug……, 应该改成"0 23-7/1 * * *"

再次感谢 @me115 !

…7 * * *'. (可以这样复现错误: cat >>/etc/crontab<<<'* 18-19/1 * * * root date>>/root/cron_test.txt')
@me115
Copy link
Owner

me115 commented Dec 3, 2016

多谢指出修正;

@me115 me115 merged commit 934c7b3 into me115:master Dec 3, 2016
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.

None yet

2 participants