You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Michele <mi...@finconsgroup.com> on 2016/02/22 19:23:10 UTC
Quartz 2 Consumer with cron expression and avoiding some range of
date
Hi everyone,
a common requirement in my business is to provide a scheduled delivery of
messages avoiding some range of date (Ex. holiday)
Is there a way to configure quartz consumer to avoid some date?
Quartz documentation suggestions this:
HolidayCalendar cal = new HolidayCalendar();
cal.addExcludedDate( someDate );
cal.addExcludedDate( someOtherDate );
sched.addCalendar("myHolidays", cal, false);
....
Trigger t2 = newTrigger()
.withIdentity("myTrigger2")
.forJob("myJob2")
.withSchedule(dailyAtHourAndMinute(11, 30)) // execute job daily at
11:30
.modifiedByCalendar("myHolidays") // but not on holidays
...
Thanks in advance.
Greeting
Michele
--
View this message in context: http://camel.465427.n5.nabble.com/Quartz-2-Consumer-with-cron-expression-and-avoiding-some-range-of-date-tp5778071.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Quartz 2 Consumer with cron expression and avoiding some range
of date
Posted by Michele <mi...@finconsgroup.com>.
Hi Claus,
thanks for your reply.
In the meantime of jira ticket, can I extend QuartzComponent and
QuartzEndpoint(where the Trigger is initialized) to resolve my requirement?
Or can you provide me other suggestions?
Thanks in advance
Greeting
Michele
--
View this message in context: http://camel.465427.n5.nabble.com/Quartz-2-Consumer-with-cron-expression-and-avoiding-some-range-of-date-tp5778071p5778139.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Quartz 2 Consumer with cron expression and avoiding some range of date
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
This sounds like a good idea, you are welcome to log a JIRA ticket so
we can add support for this
http://camel.apache.org/support.html
On Mon, Feb 22, 2016 at 7:23 PM, Michele
<mi...@finconsgroup.com> wrote:
> Hi everyone,
>
> a common requirement in my business is to provide a scheduled delivery of
> messages avoiding some range of date (Ex. holiday)
>
> Is there a way to configure quartz consumer to avoid some date?
>
> Quartz documentation suggestions this:
>
> HolidayCalendar cal = new HolidayCalendar();
> cal.addExcludedDate( someDate );
> cal.addExcludedDate( someOtherDate );
>
> sched.addCalendar("myHolidays", cal, false);
> ....
> Trigger t2 = newTrigger()
> .withIdentity("myTrigger2")
> .forJob("myJob2")
> .withSchedule(dailyAtHourAndMinute(11, 30)) // execute job daily at
> 11:30
> .modifiedByCalendar("myHolidays") // but not on holidays
> ...
>
> Thanks in advance.
>
> Greeting
> Michele
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Quartz-2-Consumer-with-cron-expression-and-avoiding-some-range-of-date-tp5778071.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2