xml:
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd"
default-lazy-init="true">
racAccountQuartz的定时任务配置
0 5 0 * * ?
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
0 5 0 * * ?
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
RacAccountQuartzTask.java
package com.cacss.itas.rac.schedule;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.cacss.itas.rac.service.ext.IRacBankAccountProcessService;
import com.cacss.itas.rac.service.ext.IRacChartOfAccountProcessService;
@Component
public class RacAccountQuartzTask {
private static final Logger logger = Logger.getLogger(RacAccountQuartzTask.class);
@Autowired
IRacBankAccountProcessService iRacBankAccountProcessService;
@Autowired
IRacChartOfAccountProcessService iRacChartOfAccountProcessService;
/**
* update bank account status
*/
public void bankAccountTask() {
try {
iRacBankAccountProcessService.updateAccountStatus();
} catch (Exception e) {
logger.error(e.getMessage());
}
}
/**
* update chart of account status
*/
public void chartOfAccountTask() {
try {
iRacChartOfAccountProcessService.updateAccountStatus();
} catch (Exception e) {
logger.error(e.getMessage());
}
}
}