Quartz_2.2.X学习系列六:Tutorials - Lesson 6: CronTrigger

6课小结:

CronTrigger

如果您需要一个基于日历的概念来触发Job Schedule,而不是基于SimpleTrigger指特定精确的时间间隔,那么CronTrigger通常比SimpleTrigger更有用。

 

一、Cron-Expressions:用于配置CronTrigger实例。cron-表达式是由七个子表达式组成的字符串,它描述了日程安排的各个细节。这些子表达式与空白区分开,如下表示:

1. 秒

2. 分钟

3. 小时

4. 某月中的第几天

5. 月

6. 一周中的第几天

7. 年(可选字段)

一个完整的cron-表达式的例子是字符串“0 0 12 ? * WED”,意思是“每周三下午12:00”。

 

说明:

“0      0      12      ?      *      WED”

   秒    分      时     天     月     周

表示:每周三下午12:00

 

二、表达式中的字符

通配符(‘*’字符):可以用来表示该字段的“每一个”可能值。因此,前一个例子中的“月”字段的‘*’字符的意思是“每个月”。因此,“在一周的工作日里,这显然意味着这周的每一天”。

 

“/”字符:可以用来指定值的增量。

0/15:等同0,15,30,45

3/20:同3,23,43

/35:表示该小时内的每35分钟,从0分钟开始”——或者换句话说,就是指定“0,35”

 

“?“字符:它只被允许在day-of-month 和 day-of-week字段里使用。它用于指定“没有特定值”。

注:day-of-month 和 day-of-week,这两个都是设置”天”的,如果两个都设定了固定值,就会有冲突,所以这两个值至少要有一个为 ?。

 

“L”字符(last):可以在 day-of-month 和 day-of-week字段中使用。这个“L”字符是"last“的缩写,但它在这两个字段中分别有不同的含义。

day-of-week字段中使用

"L"仅仅意味着“7”或“SAT”

“6 L”或“FRIL”,都表示“某月的最后一个星期五”

在day-of-month字段中使用:

“L”表示“月的最后一天”——1月31日,2月28日(非闰年)

“L-3”,表示日历月的倒数第三天。

 

“W”字符(WeekDay,工作日):用于指定最接近给定日期的工作日(周一至周五)。举个例子,如果你要指定“15W”作为day-of-month字段的值,意思是:“获取与每月15日最近的工作日(周一到周五的日期)的日期”。

 

“#”字符:是用来指定”每月的第n个“XXX工作日”。例如,在 day-of-week中使用“6#3”或“FRI#3”,表示“本月的第三个星期五”。

 

注意,有些调度要求太过复杂,无法用单个触发器来表达——比如“每天早上9:00到10:00之间,每隔5分钟触发,而从下午1点到晚上10点之间,则每隔20分钟触发”。在这个场景中,解决方案是简单地创建两个触发器,并注册它们来运行相同的作业。

 

三、Building CronTriggers

CronTriggers实例是使用TriggerBuilder(针对 trigger的主要属性)和CronScheduleBuilder(针对CronTrigger特定属性)构建的。如果要用dsl风格来使用这些构建器,需要使用静态导入:

 

import static org.quartz.TriggerBuilder.*;

import static org.quartz.CronScheduleBuilder.*;

import static org.quartz.DateBuilder.*:

 

四、CronTrigger触发失败指令

当CronTrigger发生触发失败时,下面的指令可以用来通知Quartz它应该做什么。

MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY

MISFIRE_INSTRUCTION_DO_NOTHING

MISFIRE_INSTRUCTION_FIRE_NOW

 

 

 

Lesson 6: CronTrigger

CronTrigger is often more useful than SimpleTrigger, if you need a job-firing schedule that recurs based on calendar-like notions, rather than on the exactly specified intervals of SimpleTrigger.

With CronTrigger, you can specify firing-schedules such as “every Friday at noon”, or “every weekday and 9:30 am”, or even “every 5 minutes between 9:00 am and 10:00 am on every Monday, Wednesday and Friday during January”.

Even so, like SimpleTrigger, CronTrigger has a startTime which specifies when the schedule is in force, and an (optional) endTime that specifies when the schedule should be discontinued.

 

如果您需要一个基于日历的概念来触发Job Schedule,而不是基于SimpleTrigger指特定精确的时间间隔,那么CronTrigger通常比SimpleTrigger更有用。

使用CronTrigger,你可以指定一个触发日程,如:“每个星期五中午”或“每个工作日的上午9:30”,或者“在一月份的每一个周一,周三和周五的上午9:00到10:00之间,每5分钟触发一次“

即便如此,像SimpleTrigger一样,CronTrigger有一个起始时间,它指定了何时schedule会启动,以及一个(可选的)endTime,它指定了schedule何时应该停止。

 

Cron Expressions

Cron-Expressions are used to configure instances of CronTrigger. Cron-Expressions are strings that are actually made up of seven sub-expressions, that describe individual details of the schedule. These sub-expression are separated with white-space, and represent:

  1. Seconds
  2. Minutes
  3. Hours
  4. Day-of-Month
  5. Month
  6. Day-of-Week
  7. Year (optional field)

An example of a complete cron-expression is the string “0 0 12 ? * WED” - which means “every Wednesday at 12:00:00 pm”.

 

Cron-Expressions用于配置CronTrigger实例。cron-表达式是由七个子表达式组成的字符串,它描述了日程安排的各个细节。这些子表达式与空白区分开,如下表示:

1. 秒

2. 分钟

3. 小时

4. 某月中的第几天

5. 月

6. 一周中的第几天

7. 年(可选字段)

一个完整的cron-表达式的例子是字符串“0 0 12 ? * WED”,意思是“每周三下午12:00”。

 

说明:

“0      0      12      ?      *      WED”

                           

表示:每周三下午12:00

 

Individual sub-expressions can contain ranges and/or lists. For example, the day of week field in the previous (which reads “WED”) example could be replaced with “MON-FRI”, “MON,WED,FRI”, or even “MON-WED,SAT”.

 

单独的子表达式可以包含范围(-)和或(,)列表。例如,前一个(读“WED”)的星期字段可以用“MON-FRI”(周一到周五),“MON,WED,FRI(周一或周三或周五)”,或者甚至是“MON-WED,SAT(周一到周三,或周六)”来代替。

 

Wild-cards (the ‘*’ character) can be used to say “every” possible value of this field. Therefore the ‘* character in the “Month” field of the previous example simply means “every month”. A ‘*’ in the Day-Of-Week field would therefore obviously mean “every day of the week”.

 

All of the fields have a set of valid values that can be specified. These values should be fairly obvious - such as the numbers 0 to 59 for seconds and minutes, and the values 0 to 23 for hours. Day-of-Month can be any value 1-31, but you need to be careful about how many days are in a given month! 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.

 

通配符(‘*字符):可以用来表示该字段的“每一个”可能值。因此,前一个例子中的“月”字段的‘*’字符的意思是“每个月”。因此,“在一周的工作日里,这显然意味着这周的每一天”。

 

所有的字段都有一组可以指定的有效值。这些值应该是相当明显的——比如0到59的秒数和分钟数,以及0到23的小时数。Day-of-Month可以是1-31的任何值,但是你需要注意一个月的天数!Months可以指定值在0到11之间,或通过使用字符串 JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV and DEC。Days-of-Week之间可以指定值为1和7(1 =周日)或使用字符串表示,SUN, MON, TUE, WED, THU, FRI and SAT。

 

 

The ‘/’ character can be used to specify increments to values. For example, if you put ‘0/15’ in the Minutes field, it means ‘every 15th minute of the hour, starting at minute zero’. If you used ‘3/20’ in the Minutes field, it would mean ‘every 20th minute of the hour, starting at minute three’ - or in other words it is the same as specifying ‘3,23,43’ in the Minutes field. Note the subtlety that “/35” does *not mean “every 35 minutes” - it mean “every 35th minute of the hour, starting at minute zero” - or in other words the same as specifying ‘0,35’.

 

“/”字符:可以用来指定值的增量。举个例子,如果你把“0/15”放在分钟里,它的意思是“该小时内的每每15分钟,从0分钟开始”。如果你在分钟中使用了“3/20”,那就意味着“该小时内的每20分钟,从3分钟开始”,或者换句话说,它和在分钟字段中指定“3,23,43”是一样的。请注意“/35”并不意味着“每35分钟”——它的意思是“该小时内的每35分钟,从0分钟开始”——或者换句话说,就是指定“0,35”。

 

说明:N/M,表示当时间到任何小时的第N分钟的时候,任务开始,每过 N+M分钟的时间(),任务又会被触发。如果N+M > 60分钟时,则任务重新从N分钟开始触发,如此循环。

如:在”分钟“中使用3/20

第一次执行:第3分钟

第二次执行:3 + 20 = 23,在第23分钟时执行

第三次执行:23 + 20 = 43,在第43分钟时执行

第四次执行:43 + 20 = 63,超过了60分钟(1小时),所以该小时内的循环结束。重新从下一个小时的第3钟开始。

3/20,就相当于 3,23,43(即在这三个时间点触发任务)

 

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 fields, but not the other. See the examples below (and CronTrigger JavaDoc) for clarification.

 

“?“字符:它只被允许在day-of-month 和 day-of-week字段里使用。它用于指定“没有特定值”。当您需要在day-of-month 和 day-of-week这两个字段中某一个指定一些值时,它是非常有用的。请参阅下面的示例(以及CronTrigger JavaDoc)以更清楚的理解。

 

注:day-of-month day-of-week,这两个都是设置”天”的,如果两个都设定了固定值,就会有冲突,所以这两个值至少要有一个为 ?。

 

如下面的例子,不是day-of-month为?,就是day-of-week为?:

Expression

Meaning

"0 0 12 * * ?"

Fire at 12pm (noon) every day

"0 15 10 ? * *"

Fire at 10:15am every day

"0 15 10 * * ?"

Fire at 10:15am every day

 

 

The ‘L’ character is allowed for the day-of-month and day-of-week fields. This character is short-hand for “last”, but it has different meaning in each of the two fields. For example, the value “L” in the day-of-month field means “the last day of the month” - day 31 for January, day 28 for February on non-leap years. If used in the day-of-week field by itself, it simply means “7” or “SAT”. But if used in the day-of-week field after another value, it means “the last xxx day of the month” - for example “6L” or “FRIL” both mean “the last friday of the month”. You can also specify an offset from the last day of the month, such as “L-3” which would mean the third-to-last day of the calendar month. When using the ‘L’ option, it is important not to specify lists, or ranges of values, as you’ll get confusing/unexpected results.

 

L”字符(last)可以在 day-of-month 和 day-of-week字段中使用。这个“L”字符是"last“的缩写,但它在这两个字段中分别有不同的含义。例如,“L”在day-of-month字段中表示“月的最后一天”——1月31日,2月28日为非闰年最后一天。如果在day-of-week字段中使用,"L"仅仅意味着“7”或“SAT”(一周的最后一天总会是周六的【美国一周最后一天是周六】)。但是,如果day-of-week字段中,”L“写在了另一个值的后面,它的意思是“某月的最后一个周几”——例如“6 L”或“FRIL”,都表示“某月的最后一个星期五”。您还可以指定一个月的最后一天的偏移量,比如“L-3”(在day-of-month字段中使用),这意味着日历月的倒数第三天。

注:在使用“L”选项时,重要的是不要指定列表或范围值,否则您会得到混淆/意外的结果。

 

例如:

"0 15 10 L * ?"

Fire at 10:15am on the last day of every month

"0 15 10 ? * 6L"

Fire at 10:15am on the last Friday of every month

 

The ‘W’ is used to specify the weekday (Monday-Friday) nearest the given day. As an example, if you were to specify “15W” as the value for the day-of-month field, the meaning is: “the nearest weekday to the 15th of the month”.

 

“W”字符(WeekDay,工作日):用于指定最接近给定日期的工作日(周一至周五)。举个例子,如果你要指定“15W”作为day-of-month字段的值,意思是:“获取与每月15日最近的工作日(周一到周五的日期)的日期”。

 

The ‘#’ is used to specify “the nth” XXX weekday of the month. For example, the value of “6#3” or “FRI#3” in the day-of-week field means “the third Friday of the month”.

Here are a few more examples of expressions and their meanings - you can find even more in the JavaDoc for org.quartz.CronExpression

 

#”字符:是用来指定”每月的第n个“XXX工作日”。例如,在 day-of-week中使用“6#3”或“FRI#3”,表示“本月的第三个星期五”。

 

下面是一些表达式的例子它们的意义——您可以在JavaDoc中找到更多的例子。

 

Example Cron Expressions

CronTrigger Example 1 - an expression to create a trigger that simply fires every 5 minutes

“0 0/5 * * * ?”

CronTrigger Example 2 - an expression to create a trigger that fires every 5 minutes, at 10 seconds after the minute (i.e. 10:00:10 am, 10:05:10 am, etc.).

“10 0/5 * * * ?”

CronTrigger Example 3 - an expression to create a trigger that fires at 10:30, 11:30, 12:30, and 13:30, on every Wednesday and Friday.

“0 30 10-13 ? * WED,FRI”

CronTrigger Example 4 - an expression to create a trigger that fires every half hour between the hours of 8 am and 10 am on the 5th and 20th of every month. Note that the trigger will NOT fire at 10:00 am, just at 8:00, 8:30, 9:00 and 9:30

“0 0/30 8-9 5,20 * ?”

 

Note that some scheduling requirements are too complicated to express with a single trigger - such as “every 5 minutes between 9:00 am and 10:00 am, and every 20 minutes between 1:00 pm and 10:00 pm”. The solution in this scenario is to simply create two triggers, and register both of them to run the same job.

 

注意,有些调度要求太过复杂,无法用单个触发器来表达——比如“每天早上9:00到10:00之间,每隔5分钟触发,而从下午1点到晚上10点之间,则每隔20分钟触发”。在这个场景中,解决方案是简单地创建两个触发器,并注册它们来运行相同的作业。

 

Building CronTriggers

CronTrigger instances are built using TriggerBuilder (for the trigger’s main properties) and CronScheduleBuilder (for the CronTrigger-specific properties). To use these builders in a DSL-style, use static imports:

 

CronTriggers实例是使用TriggerBuilder(针对 trigger的主要属性)和CronScheduleBuilder(针对CronTrigger特定属性)构建的。如果要用dsl风格来使用这些构建器,需要使用静态导入:

 

import static org.quartz.TriggerBuilder.*;
import static org.quartz.CronScheduleBuilder.*;
import static org.quartz.DateBuilder.*:

 

Build a trigger that will fire every other minute, between 8am and 5pm, every day:
  trigger = newTrigger()
    .withIdentity("trigger3", "group1")
    .withSchedule(cronSchedule("0 0/2 8-17 * * ?"))
    .forJob("myJob", "group1")
    .build();

 

Build a trigger that will fire daily at 10:42 am:
  trigger = newTrigger()
    .withIdentity("trigger3", "group1")
    .withSchedule(dailyAtHourAndMinute(10, 42))
    .forJob(myJobKey)
    .build();

or -
  trigger = newTrigger()
    .withIdentity("trigger3", "group1")
    .withSchedule(cronSchedule("0 42 10 * * ?"))
    .forJob(myJobKey)
    .build();

 

Build a trigger that will fire on Wednesdays at 10:42 am, in a TimeZone other than the system’s default:
  trigger = newTrigger()
    .withIdentity("trigger3", "group1")
    .withSchedule(weeklyOnDayAndHourAndMinute(DateBuilder.WEDNESDAY, 10, 42))
    .forJob(myJobKey)
    .inTimeZone(TimeZone.getTimeZone("America/Los_Angeles"))
    .build();

or -
  trigger = newTrigger()
    .withIdentity("trigger3", "group1")
    .withSchedule(cronSchedule("0 42 10 ? * WED"))
    .inTimeZone(TimeZone.getTimeZone("America/Los_Angeles"))
    .forJob(myJobKey)
    .build();

 

CronTrigger Misfire Instructions

The following instructions can be used to inform Quartz what it should do when a misfire occurs for CronTrigger. (Misfire situations were introduced in the More About Triggers section of this tutorial). These instructions are defined as constants on CronTrigger itself (including JavaDoc describing their behavior). The instructions include:

 

CronTrigger触发失败指令

当CronTrigger发生触发失败时,下面的指令可以用来通知Quartz它应该做什么。(Misfire指令已在”第四课“有介绍)。这些指令被定义为CronTrigger本身的常量(包括描述其行为的JavaDoc)。这些指令包括:

 

Misfire Instruction Constants of CronTrigger


MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY
MISFIRE_INSTRUCTION_DO_NOTHING
MISFIRE_INSTRUCTION_FIRE_NOW

 

All triggers also have the Trigger.MISFIRE_INSTRUCTION_SMART_POLICY instruction available for use, and this instruction is also the default for all trigger types. The ‘smart policy’ instruction is interpreted by CronTrigger as MISFIRE_INSTRUCTION_FIRE_NOW. The JavaDoc for the CronTrigger.updateAfterMisfire() method explains the exact details of this behavior.

When building CronTriggers, you specify the misfire instruction as part of the simple schedule (via CronSchedulerBuilder):

 

所有触发器都有Trigger.MISFIRE_INSTRUCTION_SMART_POLICY 指令可供使用,并且该指令也是所有触发器类型的默认值。“智能政策”指令被CronTrigger解释为“MISFIRE_INSTRUCTION_FIRE_NOW”。关于CronTrigger.updateAfterMisfire() 方法,JavaDoc中有这种行为的确切细节。

在建立CronTriggers时,您可以将misfire指令指定为简单调度的一部分(通过cronschedule erbuilder):

 

  trigger = newTrigger()
    .withIdentity("trigger3", "group1")
    .withSchedule(cronSchedule("0 0/2 8-17 * * ?")
        ..withMisfireHandlingInstructionFireAndProceed())
    .forJob("myJob", "group1")
    .build();

 

Pasted from <http://www.quartz-scheduler.org/documentation/quartz-2.2.x/tutorials/tutorial-lesson-06.html>

 

 

Blow description from the Quartz's javadoc

Expression

Meaning

"0 0 12 * * ?"

Fire at 12pm (noon) every day

"0 15 10 ? * *"

Fire at 10:15am every day

"0 15 10 * * ?"

Fire at 10:15am every day

"0 15 10 * * ? *"

Fire at 10:15am every day

"0 15 10 * * ? 2005"

Fire at 10:15am every day during the year 2005

"0 * 14 * * ?"

Fire every minute starting at 2pm and ending at 2:59pm, every day

"0 0/5 14 * * ?"

Fire every 5 minutes starting at 2pm and ending at 2:55pm, every day

"0 0/5 14,18 * * ?"

Fire every 5 minutes starting at 2pm and ending at 2:55pm, AND fire every 5 minutes starting at 6pm and ending at 6:55pm, every day

"0 0-5 14 * * ?"

Fire every minute starting at 2pm and ending at 2:05pm, every day

"0 10,44 14 ? 3 WED"

Fire at 2:10pm and at 2:44pm every Wednesday in the month of March.

"0 15 10 ? * MON-FRI"

Fire at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday

"0 15 10 15 * ?"

Fire at 10:15am on the 15th day of every month

"0 15 10 L * ?"

Fire at 10:15am on the last day of every month

"0 15 10 ? * 6L"

Fire at 10:15am on the last Friday of every month

"0 15 10 ? * 6L"

Fire at 10:15am on the last Friday of every month

"0 15 10 ? * 6L 2002-2005"

Fire at 10:15am on every last Friday of every month during the years 2002, 2003, 2004 and 2005

"0 15 10 ? * 6#3"

Fire at 10:15am on the third Friday of every month

 

Pay attention to the effects of '?' and '*' in the day-of-week and day-of-month fields!

NOTES:

  • Support for specifying both a day-of-week and a day-of-month value is not complete (you'll need to use the '?' character in on of these fields).
  • Be careful when setting fire times between mid-night and 1:00 AM - "daylight savings" can cause a skip or a repeat depending on whether the time moves back or jumps forward.

 

 

Provides a parser and evaluator for unix-like cron expressions. Cron expressions provide the ability to specify complex time combinations such as "At 8:00am every Monday through Friday" or "At 1:30am every last Friday of the month".

Cron expressions are comprised of 6 required fields and one optional field separated by white space. The fields respectively are described as follows:

Field Name

Allowed Values

Allowed Special Characters

Seconds

0-59

, - * /

Minutes

0-59

, - * /

Hours

0-23

, - * /

Day-of-month

1-31

, - * ? / L W

Month

0-11 or JAN-DEC

, - * /

Day-of-Week

1-7 or SUN-SAT

, - * ? / L #

Year (Optional)

empty, 1970-2199

, - * /

 

 

 

The '*' character is used to specify all values. For example, "*" in the minute field means "every minute".

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 fields, but not the other.

The '-' character is used to specify ranges For example "10-12" in the hour field means "the hours 10, 11 and 12".

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".

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 0 to 11 (JAN to DEC). 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.

The 'L' character is allowed for the day-of-month and day-of-week fields. This character is short-hand for "last", but it has different meaning in each of the two fields. For example, the value "L" in the day-of-month field means "the last day of the month" - day 31 for January, day 28 for February on non-leap years. If used in the day-of-week field by itself, it simply means "7" or "SAT". But if used in the day-of-week field after another value, it means "the last xxx day of the month" - for example "6L" means "the last friday of the month". You can also specify an offset from the last day of the month, such as "L-3" which would mean the third-to-last day of the calendar month. When using the 'L' option, it is important not to specify lists, or ranges of values, as you'll get confusing/unexpected results.

The 'W' character is allowed for the day-of-month field. This character is used to specify the weekday (Monday-Friday) nearest the given day. As an example, if you were to specify "15W" as the value for the day-of-month field, the meaning is: "the nearest weekday to the 15th of the month". So if the 15th is a Saturday, the trigger will fire on Friday the 14th. If the 15th is a Sunday, the trigger will fire on Monday the 16th. If the 15th is a Tuesday, then it will fire on Tuesday the 15th. However if you specify "1W" as the value for day-of-month, and the 1st is a Saturday, the trigger will fire on Monday the 3rd, as it will not 'jump' over the boundary of a month's days. The 'W' character can only be specified when the day-of-month is a single day, not a range or list of days.

The 'L' and 'W' characters can also be combined for the day-of-month expression to yield 'LW', which translates to "last weekday of the month".

The '#' character is allowed for the day-of-week field. This character is used to specify "the nth" XXX day of the month. For example, the value of "6#3" in the day-of-week field means the third Friday of the month (day 6 = Friday and "#3" = the 3rd one in the month). Other examples: "2#1" = the first Monday of the month and "4#5" = the fifth Wednesday of the month. Note that if you specify "#5" and there is not 5 of the given day-of-week in the month, then no firing will occur that month. If the '#' character is used, there can only be one expression in the day-of-week field ("3#1,6#3" is not valid, since there are two expressions).

The legal characters and the names of months and days of the week are not case sensitive.

NOTES:

  • Support for specifying both a day-of-week and a day-of-month value is not complete (you'll need to use the '?' character in one of these fields).
  • Overflowing ranges is supported - that is, having a larger number on the left hand side than the right. You might do 22-2 to catch 10 o'clock at night until 2 o'clock in the morning, or you might have NOV-FEB. It is very important to note that overuse of overflowing ranges creates ranges that don't make sense and no effort has been made to determine which interpretation CronExpression chooses. An example would be "0 0 14-6 ? * FRI-MON".
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值