<bean id="folderCleanerBean" class="cn.com.n22.global.quartzJob.FolderCleaner"></bean>
<bean id="systemFolderCleanerJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="folderCleanerBean"></property>
<property name="targetMethod" value="execute"></property>
<property name="concurrent" value="false" />
</bean>
<bean id="FolderCleanerTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail" ref="systemFolderCleanerJobDetail" />
<property name="cronExpression" value="0 6 17 * * ?" />
</bean>
<bean id="startQuertz" class="org.springframework.scheduling.quartz.SchedulerFactoryBean" lazy-init="false" >
<property name="triggers">
<list>
<ref bean="FolderCleanerTrigger"/>
</list>
</property>
</bean>
参考:[url]http://yangpanwww.iteye.com/blog/797563[/url]