package crawler.route;

import crawler.processor.Processor0;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;

/**
 * @author HZY
 * @vsrsion 1.0
 * Created at 2016/11/17.
 */
public class QuartzRoute extends RouteBuilder {
    @Override
    public void configure() throws Exception {


        from("quartz://myGroupName/myTimerName?cron=0/5+*+*+*+*+?")
                .process(new Processor0() {
                    @Override
                    public void process(Exchange exchange) throws Exception {
                        System.out.println("I'm running every 5 sec...Change by XXXX===========");
                    }
                });
    }
}
