Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- profile
- 네트워크
- resource
- bash
- Mac
- maVen
- JavaScript
- port
- Windows
- xargs
- VirtualBox
- netsh
- plugin
- 단축키
- Windows 10
- Eclipse
- Quartz
- vscode
- grep
- 줄바꿈 문자
- lsof
- Source
- ssh
- context
- import
- GIT
- IntelliJ
- find
- tomcat
- web.xml
Archives
- Today
- Total
develog
Quartz job fire manually 본문
private void test() {
try {
ApplicationContext context = new ClassPathXmlApplicationContext("classpath:spring-config.xml");
Service service = (Service) context.getBean("service");
JobDataMap jobDataMap = new JobDataMap();
jobDataMap.put("service", service);
JobDetail jobDetail = new JobDetail("job1", "group1", JobB.class);
jobDetail.setJobDataMap(jobDataMap);
CronTrigger cronTrigger = new CronTrigger("cronTrigger1", "group1", "0/5 * * * * ?");
StdSchedulerFactory sf = new StdSchedulerFactory();
Scheduler scheduler = sf.getScheduler();
scheduler.scheduleJob(jobDetail, cronTrigger);
scheduler.start();
} catch (ParseException e) {
e.printStackTrace();
} catch (SchedulerException e) {
e.printStackTrace();
}
}
'Dev > Java' 카테고리의 다른 글
AES (0) | 2013.01.27 |
---|---|
poi 대용량 엑셀 write (0) | 2013.01.08 |
Quartz - Defining a Job (0) | 2012.12.14 |
java get ip (0) | 2012.12.14 |
Apache Derby Eclipse plug-in (0) | 2012.12.08 |
Comments