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
- xargs
- Mac
- tomcat
- Quartz
- import
- Windows
- plugin
- JavaScript
- IntelliJ
- netsh
- bash
- 줄바꿈 문자
- Windows 10
- resource
- GIT
- ssh
- 네트워크
- Source
- maVen
- lsof
- find
- web.xml
- grep
- Eclipse
- VirtualBox
- profile
- vscode
- port
- 단축키
- context
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