[resolved] Is it possible to schedule execution exported job in Karaf container

One Star

[resolved] Is it possible to schedule execution exported job in Karaf container

Hi,
I created a job that fetches emails from an email account an process them.. I also succeded to deploy this job in ESB runtime (karaf container). Every thing works fine, however the job runs

Is it possible to schedule the execution of this job once deployed in runtime ? and how to do it ? (my purpose is to fetch mail every 2 min).
I know it is possbile to export the job as autonomous job and cronjob it, but is it possible to do equivalent thing within karaf runtime ?
Thanks for help and advice,

Accepted Solutions
Employee

Re: [resolved] Is it possible to schedule execution exported job in Karaf container

Are you using the Mediation perspective with Camel Routes, or the Integration perspective DI Jobs?
For Camel Routes, see the camel-quartz component http://camel.apache.org/quartz.html.
Use the cMessageEndpoint along with aURI as specified in the link above to implement the quartz timer. Don't forget to add the camel-quartz dependency in the Advanced tab.
The camel-quartz endpoint will work fine in Studio, but it had some problems in the ESB runtime in previous previous versions. It has been fixed to work in the ESB runtime in the upcoming ESB 5.1.1 runtime.
For simple schedules like every two minutes you can try the timer component http://camel.apache.org/timer.html

All Replies
Employee

Re: [resolved] Is it possible to schedule execution exported job in Karaf container

Are you using the Mediation perspective with Camel Routes, or the Integration perspective DI Jobs?
For Camel Routes, see the camel-quartz component http://camel.apache.org/quartz.html.
Use the cMessageEndpoint along with aURI as specified in the link above to implement the quartz timer. Don't forget to add the camel-quartz dependency in the Advanced tab.
The camel-quartz endpoint will work fine in Studio, but it had some problems in the ESB runtime in previous previous versions. It has been fixed to work in the ESB runtime in the upcoming ESB 5.1.1 runtime.
For simple schedules like every two minutes you can try the timer component http://camel.apache.org/timer.html
One Star

Re: [resolved] Is it possible to schedule execution exported job in Karaf container

First, thanks for this quick reply,
I 'm using integration view. My job uses basic integration components. It is not linked with services nor with camel routes or camel components.
So with these extra informations, let's say, for a job that dosen't contain any routing or services features :
- is it suitable to deply it in ESB runtime and then how to schedule it ?
- Or, the best pratice is to deploy it as standalone job and thena create a cronjob to scedhule it ?
Could you comment / advice please.
Employee

Re: [resolved] Is it possible to schedule execution exported job in Karaf container

You have multiple choices.
First, our commercial subscription for Data Integration (not using the ESB runtime container at all) comes with a scheduler and a GUI. The scheduler component is called Job Conductor, and it is part of a broader Talend Administration Center (TAC) web app. The DI version does not _require_ the ESB runtime, it can deploy to a simple jobserver. If all of your jobs are batch and schedule oriented this may make sense for you.
Second, if you have a mixed environment of batch and real-time jobs, the Talend ESB supports the jobserver interface, so the same TAC scheduler will work with Talend ESB nodes.
Third, as you suggest, you can of course export your job as a jar and schedule it via cron. This would be running as a simple jvm without any type of container. Depending on your needs, this may be perfectly suitable. It depends on what non-functional requirements you have wrt monitor and control, failover, etc whether this makes sense for you.
One Star

Re: [resolved] Is it possible to schedule execution exported job in Karaf container

Thanks for this details answer.
That helped me.