Reputation: 2404
In my java application i'm processing one lack data per day using cron job but it cannot be properly do with cron jobs (DeadLineExceedException) and 10 minute is not enough to complete the process. So i would like switch the process to backends.xml. But i don't know how to move backends.xml. How can i start the process at a fixed time after moving to backends.
Upvotes: 3
Views: 415
Reputation: 9116
If I understand it correctly, you want your Cron jobs to be executed at your backend in order to have a longer deadline in processing jobs. You can add <target>[backend_version]</target>
on the cron job definition in your cron.xml in order to have the cron executed at a specific version of your app.
Combined with your backends.xml file, this means that you could configure both files as per the following examples:
backends.xml
<backends> <backend name="longtimeworker"> <class>B1</class> <instances>1</instances> </backend>
and
cron.xml
<cronentries> <cron> <url>/longtimeworkingprocesshandler</url> <schedule>every 12 hours</schedule> <target>longtimeworker</target> </cron>
That way, you can configure your cron to be executed at the longtimeworker
backend.
Upvotes: 4