下载此文档

cron表达式支持旬的改造.docx


文档分类:文学/艺术/军事/历史 | 页数:约41页 举报非法文档有奖
1/41
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/41 下载此文档
文档列表 文档介绍
.;
import ;
import ;
import ;
import ;
import ;
import ;
import ;
import ;
import ;
import ;
import ;
import ;
import ;
import ;
import ;
import ;
.;
/**
*CronExpression官方版本不支持月份倒数第几天,仅支持月份最后一天"L",但业务需求需要知道倒数第二天。
现在加上兼容如"2L(每月倒数第二天),10L","5-2L(5号到每月倒数第二天),5-10L","5-L"(5号到每月最后一天)的表达式支持。
同时加入了对于旬的支持例如: 每旬倒数第二天10点15分钟触发"0 15 10 2LX * ?"
*
* ***@author yuch
*
*/
***@SuppressWarnings({ "rawtypes", "unchecked" })
public class CronExpression implements Serializable, Cloneable {
private static final long serialVersionUID = **********L;
protected static final int SECOND = 0;
protected static final int MINUTE = 1;
protected static final int HOUR = 2;
protected static final int DAY_OF_MONTH = 3;
protected static final int MONTH = 4;
protected static final int DAY_OF_WEEK = 5;
protected static final int YEAR = 6;
protected static final int ALL_SPEC_INT = 99; // '*'
protected static final int NO_SPEC_INT = 98; // '?'
protected static final Integer ALL_SPEC = new Integer(ALL_SPEC_INT);
protected static final Integer NO_SPEC = new Integer(NO_SPEC_INT);
protected static final Map monthMap = new HashMap(20);
protected static final Map dayMap = new HashMap(60);
protected static final String BLANK = " \t";
protected static final int CronTrigger_YEAR_TO_GIVEUP_SCHEDULING_AT = 2299;
static {
("JAN", new Integer(0));
("FEB", new Integer(1));
("MAR", new Integer(2));
("APR", new Integer(3));
("MAY", new Integer(4));
("JUN", new Integer(5));
("JUL", new Integer(6));
("AUG", new Intege

cron表达式支持旬的改造 来自淘豆网www.taodocs.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数41
  • 收藏数0 收藏
  • 顶次数0
  • 上传人mh900965
  • 文件大小34 KB
  • 时间2017-12-22