<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans
	http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">

	<!-- Auto create endPoint for mobile device notification -->
	<!--  
	<bean name="endPointJob" class="org.springframework.scheduling.quartz.JobDetailFactoryBean">
		<property name="Durability" value="true"/>
		<property name="jobClass" value="ez.metrix.run.AutoCreateEndPoint" />
	</bean>
	<bean id="simpleTriggerEndPoint" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean">
		<property name="jobDetail" ref="endPointJob" />
		<property name="repeatInterval" value="18000" />
		<property name="startDelay" value="1000" />
	</bean>
	<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
		<property name="jobDetails">
			<list>
				<ref bean="endPointJob" />
			</list>
		</property>
		<property name="triggers">
			<list>
				<ref bean="simpleTriggerEndPoint" />
			</list>
		</property>
	</bean>
	 -->

	<!-- Auto Calculate Notification Data to mobile devices -->
	<bean name="calculateNotificationDataJob" class="org.springframework.scheduling.quartz.JobDetailFactoryBean">
		<property name="Durability" value="true"/>
		<property name="jobClass" value="ez.metrix.run.AutoCalculateNotificationData" />
	</bean>
	<bean id="cronTriggerCalculateNotificationData" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
		<property name="jobDetail" ref="calculateNotificationDataJob" />
		<property name="cronExpression" value="0 0 2 * * ?" />
	</bean>
	<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
		<property name="jobDetails">
			<list>
				<ref bean="calculateNotificationDataJob" />
			</list>
		</property>
		<property name="triggers">
			<list>
				<ref bean="cronTriggerCalculateNotificationData" />
			</list>
		</property>
	</bean>

	<!-- Auto push notification 7h-->
  	<bean name="pushNotificationJob" class="org.springframework.scheduling.quartz.JobDetailFactoryBean">
  		<property name="Durability" value="true"/>
		<property name="jobClass" value="ez.metrix.run.AutoPushNotificationDaily" />
	</bean>
	<bean id="cronTriggerPushNotification" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
		<property name="jobDetail" ref="pushNotificationJob" />
		<property name="cronExpression" value="0 0 7 * * ?" />
	</bean>
	<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
		<property name="jobDetails">
			<list>
				<ref bean="pushNotificationJob" />
			</list>
		</property>
		<property name="triggers">
			<list>
				<ref bean="cronTriggerPushNotification" />
			</list>
		</property>
	</bean>
	
	<!-- Auto push notification invoice -->
	<!-- 
    <bean name="pushNotificationInvoiceJob" class="org.springframework.scheduling.quartz.JobDetailFactoryBean">
      	<property name="Durability" value="true"/>
		<property name="jobClass" value="ez.metrix.run.AutoPushInvoiceNotification" />
	</bean>
	<bean id="cronTriggerPushNotificationInvoice" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean">
		<property name="jobDetail" ref="pushNotificationInvoiceJob" />
		<property name="repeatInterval" value="18000" />
		<property name="startDelay" value="1000" />
	</bean>
	<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
		<property name="jobDetails">
			<list>
				<ref bean="pushNotificationInvoiceJob" />
			</list>
		</property>
		<property name="triggers">
			<list>
				<ref bean="cronTriggerPushNotificationInvoice" />
			</list>
		</property>
	</bean>
	 -->
	
 	<bean name="convertEventToNotifiInvoiceJob" class="org.springframework.scheduling.quartz.JobDetailFactoryBean">
 		<property name="Durability" value="true"/>
		<property name="jobClass" value="ez.metrix.run.AutoHandingActionEvent" />
	</bean>
	<bean id="cronTriggerConvertEventToNotifiInvoice" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean">
		<property name="jobDetail" ref="convertEventToNotifiInvoiceJob" />
		<property name="repeatInterval" value="4000" />
		<property name="startDelay" value="1000" />
	</bean>
	<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
		<property name="jobDetails">
			<list>
				<ref bean="convertEventToNotifiInvoiceJob" />
			</list>
		</property>
		<property name="triggers">
			<list>
				<ref bean="cronTriggerConvertEventToNotifiInvoice" />
			</list>
		</property>
	</bean>
	
	<!-- Auto push delete notification invoice -->
    <bean name="deleteNotificationInvoiceJob" class="org.springframework.scheduling.quartz.JobDetailFactoryBean">
    	<property name="Durability" value="true"/>
		<property name="jobClass" value="ez.metrix.run.AutoDeleteNotificationInvoice" />
	</bean>
	<bean id="cronTriggerDeleteNotification" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean ">
		<property name="jobDetail" ref="deleteNotificationInvoiceJob" />
		<property name="cronExpression" value="0 0 1 * * ?" />
	</bean>
	<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
		<property name="jobDetails">
			<list>
				<ref bean="deleteNotificationInvoiceJob" />
			</list>
		</property>
		<property name="triggers">
			<list>
				<ref bean="cronTriggerDeleteNotification" />
			</list>
		</property>
	</bean>
	
	<!-- Auto push delete action events -->
    <bean name="deleteActionEventsJob" class="org.springframework.scheduling.quartz.JobDetailFactoryBean">
    	<property name="Durability" value="true"/>
		<property name="jobClass" value="ez.metrix.run.AutoDeleteActionEvents" />
	</bean>
	<bean id="cronTriggerDeleteActionEvents" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
		<property name="jobDetail" ref="deleteActionEventsJob" />
		<property name="cronExpression" value="0 0 3 * * ?" />
	</bean>
	<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
		<property name="jobDetails">
			<list>
				<ref bean="deleteActionEventsJob" />
			</list>
		</property>
		<property name="triggers">
			<list>
				<ref bean="cronTriggerDeleteActionEvents" />
			</list>
		</property>
	</bean>
</beans>