﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-Rudy-文章分类-Spring</title><link>http://www.blogjava.net/yielrues/category/20267.html</link><description>努力学习,成就一个架构师</description><language>zh-cn</language><lastBuildDate>Wed, 21 Mar 2007 21:31:44 GMT</lastBuildDate><pubDate>Wed, 21 Mar 2007 21:31:44 GMT</pubDate><ttl>60</ttl><item><title>CronExpression</title><link>http://www.blogjava.net/yielrues/articles/101287.html</link><dc:creator>Rudy</dc:creator><author>Rudy</author><pubDate>Thu, 01 Mar 2007 02:43:00 GMT</pubDate><guid>http://www.blogjava.net/yielrues/articles/101287.html</guid><wfw:comment>http://www.blogjava.net/yielrues/comments/101287.html</wfw:comment><comments>http://www.blogjava.net/yielrues/articles/101287.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yielrues/comments/commentRss/101287.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yielrues/services/trackbacks/101287.html</trackback:ping><description><![CDATA[
		<p>Cron expressions are comprised of 6 required fields and one optional field separated by white space. The fields respectively are described as follows: 
</p>
		<table cellspacing="8">
				<tbody>
						<tr>
								<th align="left">Field Name</th>
								<th align="left"> </th>
								<th align="left">Allowed Values</th>
								<th align="left"> </th>
								<th align="left">Allowed Special Characters</th>
						</tr>
						<tr>
								<td align="left">
										<code>Seconds</code>
								</td>
								<td align="left"> </td>
								<td align="left">
										<code>0-59</code>
								</td>
								<td align="left"> </td>
								<td align="left">
										<code>, - * /</code>
								</td>
						</tr>
						<tr>
								<td align="left">
										<code>Minutes</code>
								</td>
								<td align="left"> </td>
								<td align="left">
										<code>0-59</code>
								</td>
								<td align="left"> </td>
								<td align="left">
										<code>, - * /</code>
								</td>
						</tr>
						<tr>
								<td align="left">
										<code>Hours</code>
								</td>
								<td align="left"> </td>
								<td align="left">
										<code>0-23</code>
								</td>
								<td align="left"> </td>
								<td align="left">
										<code>, - * /</code>
								</td>
						</tr>
						<tr>
								<td align="left">
										<code>Day-of-month</code>
								</td>
								<td align="left"> </td>
								<td align="left">
										<code>1-31</code>
								</td>
								<td align="left"> </td>
								<td align="left">
										<code>, - * ? / L W C</code>
								</td>
						</tr>
						<tr>
								<td align="left">
										<code>Month</code>
								</td>
								<td align="left"> </td>
								<td align="left">
										<code>1-12 or JAN-DEC</code>
								</td>
								<td align="left"> </td>
								<td align="left">
										<code>, - * /</code>
								</td>
						</tr>
						<tr>
								<td align="left">
										<code>Day-of-Week</code>
								</td>
								<td align="left"> </td>
								<td align="left">
										<code>1-7 or SUN-SAT</code>
								</td>
								<td align="left"> </td>
								<td align="left">
										<code>, - * ? / L #</code>
								</td>
						</tr>
						<tr>
								<td align="left">
										<code>Year (Optional)</code>
								</td>
								<td align="left"> </td>
								<td align="left">
										<code>empty, 1970-2099</code>
								</td>
								<td align="left"> </td>
								<td align="left">
										<code>, - * /</code>
								</td>
						</tr>
				</tbody>
		</table>
		<p>The '*' character is used to specify all values. For example, "*" in the minute field means "every minute". 
</p>
		<p>The '?' character is allowed for the day-of-month and day-of-week fields. It is used to specify 'no specific value'. This is useful when you need to specify something in one of the two fileds, but not the other. 
</p>
		<p>The '-' character is used to specify ranges For example "10-12" in the hour field means "the hours 10, 11 and 12". 
</p>
		<p>The ',' character is used to specify additional values. For example "MON,WED,FRI" in the day-of-week field means "the days Monday, Wednesday, and Friday". 
</p>
		<p>The '/' character is used to specify increments. For example "0/15" in the seconds field means "the seconds 0, 15, 30, and 45". And "5/15" in the seconds field means "the seconds 5, 20, 35, and 50". Specifying '*' before the '/' is equivalent to specifying 0 is the value to start with. Essentially, for each field in the expression, there is a set of numbers that can be turned on or off. For seconds and minutes, the numbers range from 0 to 59. For hours 0 to 23, for days of the month 0 to 31, and for months 1 to 12. The "/" character simply helps you turn on every "nth" value in the given set. Thus "7/6" in the month field only turns on month "7", it does NOT mean every 6th month, please note that subtlety. </p>
<img src ="http://www.blogjava.net/yielrues/aggbug/101287.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yielrues/" target="_blank">Rudy</a> 2007-03-01 10:43 <a href="http://www.blogjava.net/yielrues/articles/101287.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>