下载此文档

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


文档分类:文学/艺术/军事/历史 | 页数:约41页 举报非法文档有奖
1/41
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/41 下载此文档
文档列表 文档介绍
cron表达式支持旬的改造_2748
cron表达式支持旬的改造_2748
cron表达式支持旬的改造_2748
.专业整理 .
package .;
import ;
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 {
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; // '*'
. 学****帮手 .
cron表达式支持旬的改造_2748
cron表达式支持旬的改造_2748
cron表达式支持旬的改造_2748
.专业整理 .
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));
("

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

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数41
  • 收藏数0 收藏
  • 顶次数0
  • 上传人小熙
  • 文件大小53 KB
  • 时间2021-12-01