@@ -0,0 +1,1205 @@
+package de.jeha.kame.crawler.scheduler.quartz;%0A%0Aimport io.dropwizard.lifecycle.Managed;%0Aimport org.quartz.Scheduler;%0Aimport org.quartz.SchedulerFactory;%0Aimport org.quartz.impl.StdSchedulerFactory;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport java.util.Properties;%0A%0A/**%0A * @author jenshadlich@googlemail.com%0A */%0Apublic class ManagedScheduler implements Managed %7B%0A%0A    private static final Logger LOG = LoggerFactory.getLogger(ManagedScheduler.class);%0A%0A    private Scheduler scheduler;%0A%0A    @Override%0A    public void start() throws Exception %7B%0A        LOG.info(%22start Quartz scheduler%22);%0A%0A        // TODO: move to config%0A        Properties properties = new Properties();%0A        properties.setProperty(%22org.quartz.jobStore.class%22, %22org.quartz.simpl.RAMJobStore%22);%0A        properties.setProperty(%22org.quartz.threadPool.class%22, %22org.quartz.simpl.SimpleThreadPool%22);%0A        properties.setProperty(%22org.quartz.threadPool.threadCount%22, %224%22);%0A%0A        scheduler = new StdSchedulerFactory(properties).getScheduler();%0A        scheduler.start();%0A    %7D%0A%0A    @Override%0A    public void stop() throws Exception %7B%0A        LOG.info(%22stop Quartz scheduler%22);%0A        scheduler.shutdown(true);%0A    %7D%0A%0A%7D%0A

add managed scheduler