<!--Configure the Job Timer task class - <BeanID= "Triggercalculatelecturerprofitjob"class= "Com.itzixi.quartz.job.CalculateLecturerProfitJob"></Bean> <!--Configure Jobdetail - <BeanID= "Triggercalculatelecturerprofitjobmethod"class= "Org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> < Propertyname= "TargetObject"> <refBean= "Triggercalculatelecturerprofitjob"/> </ Property> <!--the name of the method to execute Triggercalculatelecturerprofitjob - < Propertyname= "Targetmethod"> <value>Execute</value> </ Property> </Bean> <!--Configuring the Timer task trigger trigger - <BeanID= "Triggercalculatelecturerprofitjobfactorybean"class= "Org.springframework.scheduling.quartz.CronTriggerFactoryBean"> < Propertyname= "Jobdetail"ref= "Triggercalculatelecturerprofitjobmethod"></ Property> <!--for testing, run once every minute -<!--<property name= "cronexpression" value= "0 0/1 * * *?" ></property> - <!--Run 1 o'clock in the morning every night . - < Propertyname= "Cronexpression"value= "0 0 1 * *? *"></ Property> </Bean> <!--Configuring the Dispatch factory - <BeanID= "Springjobschedulerfactorybean"class= "Org.springframework.scheduling.quartz.SchedulerFactoryBean"> < Propertyname= "Triggers"> <List> <refBean= "Triggercalculatelecturerprofitjobfactorybean"/> </List> </ Property> </Bean>
Quartz + Spring Configuration Example