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