Hi, havn't used the scheduler option in the file component so I can't provide any input on that.
What I have been using though is using the Quartz Component https://camel.apache.org/components/3.4.x/quartz-component.html in combination with file i.e. from quartz to file Might be worth giving that a try. BR Maruan Am Dienstag, dem 10.08.2021 um 07:26 +0000 schrieb Mikael Andersson Wigander: > Hi > > Noone with insights on this? > > /M > > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > On Friday, July 30th, 2021 at 12:54, Mikael Andersson Wigander > <mikael.andersson.wigan...@pm.me> wrote: > > > HI, sorry for a stupid question but I can't get this to work > > properly… > > > > I thought by adding a scheduler to a file component it will only poll > > for files on schedule but apparently it executes as soon a file is > > present… > > > > What am I doing wrong here or have I understood this completely > > wrong? > > http://www.davsclaus.com/2013/08/apache-camel-212-even-easier-cron.html > > > > Camel 2.25.4, Spring Boot 2.2.0.RELEASE > > > > @Component > > public class ReadFilesOnSchedule extends RouteBuilder { > > @Override > > public void configure() throws Exception { > > from( > > "file:test/" + > > "?sortBy=file:modified" + > > "&readLock=fileLock" + > > "&scheduler=quartz2" + > > "&scheduler.cron=0/3+*+*+?+*+MON-FRI" + > > "&scheduler.triggerId=testId" + > > "&scheduler.triggerGroup=TEST") > > .id("TESTSCHEDULER") > > .log("Filename: ${header.CamelFileName}") > > .end(); > > } > > } > > > > /M -- -- Maruan Sahyoun FileAffairs GmbH Josef-Schappe-Straße 21 40882 Ratingen Tel: +49 (2102) 89497 88 Fax: +49 (2102) 89497 91 sahy...@fileaffairs.de www.fileaffairs.de Geschäftsführer: Maruan Sahyoun Handelsregister: AG Düsseldorf, HRB 53837 UST.-ID: DE248275827