Spring - Simple use of Quartz to realize timing jobs

xiaoxiao2021-03-06  46

Timed batch jobs are a very important ring in J2EE corporate applications, used to conduct financial licensing, data transfers, news broadcasts, etc. in the evening.

In Spring, it has been well integrated with Quartz, simply like CRON, and can be automatically executed in the XML file, and do not need to write a line of code. Spring is a simplified quarter of the Quartz big knife, and the Quartz project group may be able to learn.

confirmorder

0 0 6, 12, 20 * *?

The above configuration file specifies the confirmorder () method for performing a FinanceDao object at 6am and 8 in the evening.

Attached: CRONEXPRESSION configuration instructions

Special characters allowed by field allow for special characters to be allowed by 0-59, - * / 分 0-59, - * / hour 0-23, - * / Date 1-31, - *? / LWC month 1-12 or Jan-Dec, - * / Week 1-7 or Sun-sat, - *? / Lc # years (optional) Leaves the blank, 1970-2099, - * /

转载请注明原文地址:https://www.9cbs.com/read-62743.html

New Post(0)