A: Quartz framework
What is Quartz: Quartz is a Java open source project OpenSymphony open source organization, in 2009 was acquired by Terracotta
Quartz is what to do: to do something at a certain specified time, Quartz is to define a trigger condition, it would be responsible to a point in time (to meet the conditions for a trigger event) triggers the appropriate task
For example Quartz things you can do (in the case of life):
1 year birthday
2, flower chanting monthly repayment
3, at intervals of one hour, back up your study notes
Quartz features:
1, a powerful scheduling features, such as support for a variety of scheduling
2, flexible application ways, such as supporting a variety of combinations and task scheduling
3, create a configuration class uses Quartz @Configuration annotation, this annotation is equivalent to the xml tag, it will be used @bean notes, the equivalent tag, usually used in conjunction with both
4, a write scheduler
Method scheduler:
1, fixedDelay in N seconds after the trigger unit on a task ms
2, fixedRate after N seconds on a start task begins milliseconds
3, cron = complex scheduling period after the equals sign is an expression cron = "expression" expression format: the expression: [sec] [min] [time] [day] [month] [weeks] [Y] in generally do not set
cron expression wildcards: Wildcard generate website: https: //qqe2.com/cron
1, * represents all values. For example: In the sub-field setting * indicates every minute trigger.
2 ,? said they did not specify a value, do not need to be concerned about the current setting value of this field
3, - representing the interval. For example, set up "10-12" on the hour, 10, 11, represents the point triggers
4 ,, represents specify multiple values, such as setting "MON, WED, FRI" in the week field said on Monday, Wednesday and Friday trigger
5, / for incrementing trigger. 0/5 every 5 seconds
6, L represents the last meaning W represents the weekday closest to the specified date (Monday to Friday)
7, # number (represented in the first few days of the week each month), for example, is provided in the peripheral field "6 # 3" represents the third Saturday of each month