quartz 를 이용하기

java UI 2008. 1. 22. 23:56

 <?xml version='1.0' encoding='MS949'?>
<!DOCTYPE quartz PUBLIC
  "-//Quartz Enterprise Job Scheduler//DTD Job Scheduling Data 1.5//EN"
  "http://www.quartzscheduler.org/dtd/job_scheduling_data_1_5.dtd">

<quartz>
  <job>

    <job-detail>
      <name>RankingCron</name>
      <group>RankingCrons</group>
      <job-class>com.google.beginning.bo.RankingCronBO</job-class>
      <volatility>false</volatility>
      <durability>false</durability>
      <recover>false</recover>
    </job-detail>

 

    <trigger>
 

      <cron>
        <name>60</name>
        <group>cacheTriggers</group>
        <job-name>RankingCron</job-name>
        <job-group>RankingCrons</job-group>
        <cron-expression>1 * * * * ?</cron-expression>
      </cron>

    </trigger>
  </job>

</quartz>

 

 

실제 자바 소스는 다음과 같다.

 
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;


public class RankingCronBO  implements Job {
    private static Log log = LogFactory.getLog(RankingCronBO.class);

    public void execute(JobExecutionContext context)
            throws JobExecutionException {
        log.info("RankingCronBO");

    }
}

 

'java UI' 카테고리의 다른 글

WindowBuilder Pro  (0) 2011.09.01
jsp 2.0 사용시 예제  (0) 2009.01.01
quartz 를 이용하기  (0) 2008.01.22
File Connection Optiobal Package  (0) 2006.02.28
[펌] DataSource의 복제를 통한 다중 플레이어 생성방법  (0) 2005.12.02
jtable tutorial  (0) 2005.02.16
Posted by 김용환 '김용환'

댓글을 달아 주세요