Files
ppgo_job/views/help/index.html
郝大全 34bfe3d354 初版
定时任务管理
2017-06-23 12:24:42 +08:00

87 lines
4.1 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- 分组列表 -->
<div class="container-fluid">
<div class="info-center">
<!--title-->
<div class="info-center">
<div class="page-header">
<div class="pull-left">
<h4>{{.pageTitle}}</h4>
</div>
<div class="pull-right">
<!-- <button type="button" class="btn btn-mystyle btn-sm refresh">刷新</button>
<button type="button" class="btn btn-mystyle btn-sm reback">返回</button> -->
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
<!--content-list-->
<div class="content-list">
<div class="widget-content">
<h4>Cron表达式说明</h4>
<hr />
<p>
Cron表达式是一个字符串字符串以空格隔开分为5或6个域每一个域代表一个含义系统支持的表达式格式如下<br />
<pre>Seconds Minutes Hours DayofMonth Month [DayofWeek]</pre>
其中 DayofWeek 为可选域
</p>
<p>
每一个域可出现的字符如下
<ul>
<li><b>Seconds:</b> 可出现"* / , -"四个字符有效范围为0-59的整数</li>
<li><b>Minutes:</b> 可出现"* / , -"四个字符有效范围为0-59的整数 </li>
<li><b>Hours:</b> 可出现"* / , -"四个字符有效范围为0-23的整数 </li>
<li><b>DayofMonth:</b> 可出现"* / , - ?"五个字符有效范围为0-31的整数</li>
<li><b>Month:</b> 可出现", - * /"四个字符有效范围为1-12的整数或JAN-DEC</li>
<li><b>DayofWeek:</b> 可出现"* / , - ?"五个字符有效范围为0-6的整数或SUN-SAT两个范围0表示星期天1表示星期一 依次类推 </li>
</ul>
</p>
<p>
各个字符的含义如下
<ul>
<li>* 表示匹配该域的任意值假如在Minutes域使用*, 即表示每分钟都会触发事件</li>
<li>? 字符仅被用于天和天星期两个子表达式表示不指定值当2个子表达式其中之一被指定了值以后为了避免冲突需要将另一个子表达式的值设为?</li>
<li>- 表示范围例如在Minutes域使用5-20表示从5分到20分钟每分钟触发一次</li>
<li>/ 表示起始时间开始触发然后每隔固定时间触发一次例如在Minutes域使用5/20,则意味着5分钟触发一次而2545等分别触发一次</li>
<li>, 表示列出枚举值值例如在Minutes域使用5,20则意味着在5和20分每分钟触发一次</li>
</ul>
</p>
<p>
一些例子
<pre>
0 0 10,14,16 * * ? 每天上午10点下午2点4点触发
0 0/30 9-17 * * ? 朝九晚五工作时间内每半小时触发
0 0 12 ? * WED 表示每个星期三中午12点触发
0 0 12 * * ? 每天中午12点触发
0 15 10 ? * * 每天上午10:15触发
0 15 10 * * ? 每天上午10:15触发
0 15 10 * * ? * 每天上午10:15触发
0 * 14 * * ? 在每天下午2点到下午2:59期间的每1分钟触发
0 0/5 14 * * ? 在每天下午2点到下午2:55期间的每5分钟触发
0 0/5 14,18 * * ? 在每天下午2点到2:55期间和下午6点到6:55期间的每5分钟触发
0 0-5 14 * * ? 在每天下午2点到下午2:05期间的每1分钟触发
0 10,44 14 ? 3 WED 每年三月的星期三的下午2:10和2:44触发
0 15 10 ? * MON-FRI 周一至周五的上午10:15触发
0 15 10 15 * ? 每月15日上午10:15触发
0 15 10 L * ? 每月最后一日的上午10:15触发
</pre>
</p>
</div>
</div>
</div>