This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class JobDetails { | |
@Autowired | |
private HbaseService hbaseService; | |
public JobDetails() { | |
} | |
public void executeJob() { | |
try { | |
// Business Logic | |
} catch (Exception e) { | |
logger.error("Exception >> ", e); | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:mvc="http://www.springframework.org/schema/mvc" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xmlns:util="http://www.springframework.org/schema/util" | |
xmlns:task="http://www.springframework.org/schema/task" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd | |
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd | |
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd | |
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd"> | |
<bean id="jobDetails" class="xx.xxx.xxxx.admin.quartz.JobDetails" /> | |
<task:scheduler id="scheduler" pool-size="10"/> <!-- pool-size attribute optional --> | |
<task:scheduled-tasks scheduler="scheduler"> <!-- scheduled job list --> | |
<task:scheduled ref="jobDetails" method="executeJob" cron="0 * * * * ?"/> | |
<!-- Add more job here --> | |
</task:scheduled-tasks> | |
</beans> |
No comments:
Post a Comment