Can you set 0 in the second part of cron, so it only runs once. On Fri, Apr 19, 2019 at 2:45 PM Peck, Sean <pec...@upmc.edu> wrote: > > Is there a way in the java DSL to tell a scheduled route to only run one > time? Not keep polling and running for the entire minute that matches the > timer, wthout creating an external status value external to the DSL? > Something like the timers repeatcount? > > IE this route runs as expected, on ever other minute, which it does, but it > fires up many times during that minute, once the clock ticks to the next > minute it stops, and starts again on the next minute… Is there a way in the > DSL directly to let Camel know ONLY run this once during the matched time? I > tried putting a .delay(61000) into the route, but that had no effect. > > from("scheduler:restart?scheduler=spring&scheduler.cron=*+*/2+*+*+*+?") > .log("CRON RUN"); > > > -- > Sean Peck > UPMC Enterprises > Lead Software Engineer > pec...@upmc.edu<mailto:pec...@upmc.edu> > 412 647 5624 > “The answer is a question that I never will find out.”
-- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2