Skip to content

Commit

Permalink
Merge pull request me115#22 from lslxdx/21_7_per_hour
Browse files Browse the repository at this point in the history
bug fix: '* 23-7/1 * * *'表示'23点到7点间的每1个小时的任意分钟执行一次', 所以正确的写法应该是'0 23-…
  • Loading branch information
me115 authored Dec 3, 2016
2 parents 440f761 + bbe0746 commit 934c7b3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crontab.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ $ crontab -l

### 实例12:晚上11点到早上7点之间,每隔一小时重启smb
命令:
* 23-7/1 * * * /etc/init.d/smb restart
0 23-7 * * * /etc/init.d/smb restart

### 实例13:每月的4号与每周一到周三的11点重启smb
命令:
Expand Down
2 changes: 1 addition & 1 deletion crontab.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ $ crontab <filename>
实例12:晚上11点到早上7点之间,每隔一小时重启smb
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
命令:
* 23-7/1 * * * /etc/init.d/smb restart
0 23-7 * * * /etc/init.d/smb restart

实例13:每月的4号与每周一到周三的11点重启smb
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion tool/crontab.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ crontab的文件格式
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::

* 23-7/1 * * * /etc/init.d/smb restart
0 23-7 * * * /etc/init.d/smb restart

使用注意事项
-----------------------
Expand Down

0 comments on commit 934c7b3

Please sign in to comment.