<?xml version= "1.0" encoding= "UTF-8"?>
<! DOCTYPE beans Public "-//spring//dtd bean//en" "Http://www.springframework.org/dtd/spring-beans.dtd" >
<beans>
<!--the work class to invoke--
<bean id= "Job" class= "com.mv.newspider.threesnews.NewsFrom3s" >
</bean>
<!--define methods for calling objects and calling objects--
<bean id= "Jobtask"
class= "Org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean" >
<!--called Class--
<property name= "TargetObject" ref= "Job"/>
<!--calling methods in class--
<property name= "Targetmethod" value= "work"/>
<!--concurrent processing--
<property name= "Concurrent" value= "false"/>
</bean>
<!--expression triggers--
<bean id= "Dotime"
class= "Org.springframework.scheduling.quartz.CronTriggerFactoryBean" >
<property name= "Jobdetail" ref= "Jobtask"/>
<!--cron Expressions--
<property name= "cronexpression" value= "0 20 10? * MON "/>
</bean>
<!--simple triggers: Define trigger rules--
<bean id= "Synjob"
class= "Org.springframework.scheduling.quartz.SimpleTriggerFactoryBean" >
<property name= "Jobdetail" ref= "Jobtask"/>
<!--service starts one minute and then executes 1*1000*60--
<property name= "Startdelay" value= "1"/>
<!--run once every 6 seconds 6*1000--
<property name= "Repeatinterval" value= "7200000"/>
</bean>
<!--general Management class if you lazy-init= ' false ' then the container starts executing the scheduler--
<bean id= "Startquertz" lazy-init= "false" autowire= "no"
class= "Org.springframework.scheduling.quartz.SchedulerFactoryBean" >
<property name= "Triggers" >
<list>
<ref bean= "Dotime"/>
</list>
</property>
</bean>
</beans>
Spring Configuration for Quartz