java query,java quartz CronScheduleBuilder

 2023-10-05 阅读 31 评论 0

摘要: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.每個位置可以是
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.*表示所有可能的月份

java query,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

java delayqueue、在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

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://hbdhgg.com/5/115699.html

发表评论:

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息