<!--task scheduling test implementation one: The custom Task object Com.bocloud.equipment.test.ExampleJob must inherit the Quartzjobbean class, implementing an abstract method Executeinternal creates a new task object each time a task is executed.-- ><bean id= "Myjobdetail" class= "Org.springframework.scheduling.quartz.JobDetailBean" > <!-- The Jobclass property cannot be specified as a Examplejob object through ref, which receives a class-type parameter for task scheduling, each time a new Jobclass object to execute the Executeinternal method-< Property Name= "Jobclass" value= "Com.bocloud.equipment.test.ComputerInfoGatherJob"/></bean><bean id= " Crontrigger "class=" Org.springframework.scheduling.quartz.CronTriggerFactoryBean "> <property name=" Jobdetail "ref=" Myjobdetail "/> <property name=" cronexpression "value=" 0/10 * * * *? "/></bean><bean Id= "Computerinfogatherscheduler" class= "Org.springframework.scheduling.quartz.SchedulerFactoryBean" > < Property name= "Triggers" > <list> <ref bean= "Crontrigger"/> </list> </ Property></bean>
<!-- task debugging Implementation Test Two: Property TargetObject: Specifies the object property that performs the task Targetmethod: Specifies the method that performs the task, which must be the parameterless method class= " Org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean "> <property name=" TargetObject "ref=" Computerservice "/> <property name=" Targetmethod "value=" list "/></bean> class= "Org.springframework.scheduling.quartz.CronTriggerFactoryBean" > <property name= " Jobdetail "ref=" Jobdetail "/> <property name=" cronexpression "value=" 0/10 * * * *? "/></bean> C9>class= "Org.springframework.scheduling.quartz.SchedulerFactoryBean" > <property name= "triggers "> <list> <ref bean=" Crontrigger "/> </list> </property></bean >
Reprint to: http://my.oschina.net/lhplj/blog/213773
A quartz crontrigger expression is divided into seven sub-expressions, each of which is separated by a space, from left to right: seconds, minutes, time, day of the month, month, day of the week, year, and year is not required, which means that any one expression requires a minimum of six items!
Example: 0 0 12? * WED says 12 points per Wednesday, there is no "year" This!
Field name (item) must be of value range special character
Seconds is 0-59,-*/
Cent is 0-59,-*/
Time is 0-23,-*/
The day of the month is 1-31,-*? /L W
Month is 1-12 or JAN-DEC,-*/
The day of the week is 1-7 or SUN-SAT,-*? L
Year no empty, 1970-2099,-*/
Spring and quartz implement recurring tasks