Quartz expression of an explanation

Source: Internet
Author: User

1. Crontrigger Time Format Configuration description

Crontrigger Configuration Format :

Format: [seconds] [min] [hour] [day] [month] [week] [year]

Serial number

Description

is required

Allowed values to be filled in

Allowed wildcard characters

1

Seconds

Is

0-59

, - * /

2

Score of

Is

0-59

, - * /

3

Hours

Is

0-23

, - * /

4

Day

Is

1-31

, - * ? /L W

5

Month

Is

1-12 or Jan-dec

, - * /

6

Week

Is

1-7 or Sun-sat

, - * ? L

7

Years

Whether

Empty or 1970-2099

, - * /

A wildcard description :

* : Indicates all values. For example, setting "*" on a divided field means that every minute will trigger.
? : Indicates that no value is specified. Use the scene as a value that does not need to be concerned with the current setting of this field. For example: to trigger an action at number 10th per month, but do not care about the weeks, so the field that needs the week position is set to "?" setting to 0 0 0 10 *?
- : Indicates the interval. For example, setting "10-12" on the hour indicates that the 10,11,12 point will be triggered.
, : Indicates that multiple values are specified, such as setting "Mon,wed,fri" on the week field to indicate Monday, Wednesday, and Friday triggers
/ : Used to increment the trigger. If you set "5/15" above the second, the trigger (5,20,35,50) starts at 5 seconds, every 15 seconds. The month field is set to start at ' 1/3 ' as shown in month 1th and is triggered every three days.
L : Indicates the last meaning. On the day field setting, the last day of the month (according to the current month, if February is also based on whether it is run year [leap]), the week field represents Saturday, which is equivalent to "7" or "SAT". If you precede the "L" with a number, it represents the last of the data.

For example, setting the format "6L" On the week field means "last Friday of the month"

W : Indicates the most recent working day from the specified date (Monday to Friday). For example, set "15W" on the day field, which indicates the most recent day of the month from 15th. If the number 15th is exactly Saturday, then find the most recent Friday (14th) trigger, if 15th is a week, then find the nearest next Monday (16th) trigger. If the number 15th is on the weekday (Monday to Friday), it will be triggered on that day. If the specified format is "1W", it represents the next most recent weekday trigger of 1th per month. If the number 1th is Saturday, it will be triggered by the number 3rd in Monday. (Note that the "W" can only be set to a specific number before the interval "-") is not allowed.

' L ' and ' W ' can be used in a combination. If "LW" is set on the day field, the last business day of the month is triggered

# : Ordinal (for the week of the month), for example, setting "6#3" on the Week field is the third week of the month in Saturday. Note If you specify "6#5", which is no Saturday for the fifth week, this configuration will not be triggered (for Mother's Day and Father's Day)

Week field settings, if the use of English letters is case-insensitive Mon and Mon are the same.

Common examples:

Format: [seconds] [min] [hour] [day] [month] [week] [year]

0 0 * *?            trigger   12 points per day;
0. * * & nbsp;         Trigger   daily 10:15,
0 * *?            Trigger    daily 10:15;
0 * * * *          Trigger    daily 10:15,
0 * * * 2005     2005 every 10:15  
0 * 14 * *?            every afternoon  2 point to 2:59   per minute;
0 0/5 14 * *?           every afternoon  2 point to 2:59 (the whole hour starts, every 5 minutes trigger)   
0 0/5 14,18 * *?         every afternoon  18 points to 18:59 (the whole point starts, every 5 minutes trigger)

0 0-5 * *?             every afternoon from  2 point to 2:05 per minute  
0 10,44 3 wed        3 Month every Wednesday pm  2 point 10 minutes and 2:44 trigger  
0 15 10? * mon-fri        from Monday to Friday every morning 10:15 trigger  
0 *?              15th per month 10:15 A.M. trigger  
0 L *?               10:15 Trigger   on the last day of the month;
0 * 6l              10:15 in Friday of the last week of the month  
0 * 6L 2002-2005    from 2002 to 2005 10:15 in Friday of the last week of the month

0 15 10? * 6#3 starts in Friday of the third week of the month
0 0 12 1/5 *? The first noon of each month starts every 5 days
0 11 11 11 11? Every November 11 11:11 trigger (Singles Day)

Quartz expression of an explanation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.