전자정부 cron 사용

JAVA 2024. 11. 21. 07:57

 

    <bean id="sysLogging" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
        <property name="targetObject" ref="egovSysLogScheduling" />
        <property name="targetMethod" value="sysLogSummary" />
        <property name="concurrent" value="false" />
    </bean>

    <bean id="sysLogTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean">
        <property name="jobDetail" ref="sysLogging" />
        <property name="startDelay" value="30000" />
        <property name="repeatInterval" value="864000000" />
    </bean>

    <bean id="cronTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
        <property name="jobDetail" ref="sysLogging" />
        <property name="cronExpression" value="0 11 * * * ?" />
    </bean>

    <bean id="sysLogScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
        <property name="triggers">
            <list>
                <ref bean="cronTrigger" />
            </list>
        </property>
    </bean>

 

 

sysLogTrigger 에서 cronTrigger 로 변경

cronTriggerBean 에서 cronTriggerFactoryBean 으로 변경

 

 

 

블로그 이미지

엘로드넷

,