java quartz CronScheduleBuilder

CronScheduleBuilder.cronSchedule("0 0 12 ? * WED");

Cron表达式总共有7个位置分别是
Seconds
Minutes
Hours
Day-of-Month
Month
Day-of-Week
Year (optional field)

表达secondsminuteshoursdayofmonthmonthdayofweekyear
每周三12点执行0012?*WED

1.每个位置可以是范围,可以是列表,也可以是混搭
“MON-FRI”, “MON,WED,FRI”, or “MON-WED,SAT”.

2.*表示所有可能的月份

3.数字指代时间
0 to 59 for seconds and minutes
0 to 23 for hours
Day-of-Month can be any value 1-31
Months can be specified as values between 0 and 11, or by using the strings JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV and DEC.
Days-of-Week can be specified as values between 1 and 7 (1 = Sunday) or by using the strings SUN, MON, TUE, WED, THU, FRI and SAT.

4./
‘0/15’ means ‘every 15th minute of the hour, starting at minute zero’
‘3/20’ ‘every 20th minute of the hour, starting at minute three’ 等价于 ‘3,23,43’

5.在weekday和monthday中二选一,?表示不选的一方

6.L代表last

在monthday中
L 表示月中最后一天
L-3 表示月中倒数第三天

在weekday中
L 表示星期中最后一天
L-3 表示星期中倒数第三天
6L 表示每个月最后一个周五

7#
“6#3"或"FRI#3” 表示每月第三个周五

参考:
http://www.quartz-scheduler.org/documentation/2.4.0-SNAPSHOT/tutorials/tutorial-lesson-06.html
http://www.quartz-scheduler.org/api/2.3.0/org/quartz/CronScheduleBuilder.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值