• spring配置计划任务管理器


    <!-- 计划任务管理器 -->
    <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
    <property name="triggers">
    <list>
    <ref bean="clearLogTrigger" />
    </list>
    </property>
    </bean>
    
    <!-- 清理日志任务 -->
    <bean id="clearLogTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
    <property name="jobDetail">
    <ref bean="methodInvokingJobDetail" />
    </property>
    <property name="cronExpression">
    <value>0 0 1 1 * ?</value>
    </property>
    </bean>
    
    
    <!-- 以代理方式执行任务方法 -->
    <bean id="methodInvokingJobDetail"
    class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
    <property name="targetObject">
    <ref bean="logService" />
    </property>
    <property name="targetMethod">
    <value>clearLog</value>
    </property>
    </bean>
    </beans>
    
    <!--
    秒 分 时 日 月 星期几 年 0 0 0 10 12 ? 2009 0 0 0 12 ? * 0 0 1 1 * ?
    
    2-5 之间  2,3,4,5
    
    2/2 叠加2  2,4,6,8
    
    *每
    
    ?忽略
    -->
  • 相关阅读:
    BluetoothGetRadioInfo 函数
    BluetoothFindRadioClose 函数
    BluetoothFindNextRadio 函数
    BluetoothFindFirstRadio 函数
    BLUETOOTH_DEVICE_INFO 函数
    BluetoothSetServiceState 函数
    Bluetooth Functions
    union联合体学习
    置顶
    Toppo: 1
  • 原文地址:https://www.cnblogs.com/ZhangHaiBK/p/8988650.html
Copyright © 2020-2023  润新知