on 10-02-2014 10:20 AM
Hi there,
I'm looking for some time on the wiki/experts about a way to limit the number of concurrent running cron jobs in hybris. Reason is that at some point, there are 5 or 6 big jobs running, making the other parts of the system inaccessible. The idea would be to put all the extra jobs in FIFO queue.
I already found a Spring alternative to this with the TaskExecutor ( ThreadPoolTaskExecutor ); but I wonder if 1. Hybris integrates a factory default way ; 2. How to integrate it properly?
Does anybody have an idea about this?
Thanks!
I would also explore the following:
Isolate your cron jobs and business processes to dedicated back-end nodes, do not excute these jobs storefront/customer facing nodes. A cronjob can be targeted to a particular cluster node.
Business processes can be excluded through configuration (task.excluded.cluster.ids=1,2,3,etc). You can also specify nodes to not start the timertask (cluster..cronjob.timertask.loadonstartup=false)
You mention the lucene update cronjob. By default these get created for all nodes, and the execution time is aggressive (every minute for an update). The lucene cronjobs are only created for hmc quick search (not the normal type system search) - most customers rarely use this feature. These cronjobs can be easily disabled - and in the current version of hybris the lucene search was refactored into its own extension, and disabled by default.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
isolate your cron jobs and business processes to dedicated back-end nodes,
Yep, that's what we already do, and so only the employees are impacted, not the customers.
These cronjobs can be easily disabled - and in the current version of hybris the lucene search was refactored into its own extension, and disabled by default.
We'll try that, thanks for the tip!
Just time your cron jobs accordingly and define triggers accordingly when you want to make them run. You can use regular expressions to control which day, hour or minutes. This is the best practice.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Romain
You might consider using CompositeCronJob solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem is that the jobs have noting to do between each other. For example, you will have Lucene Update running, Media import running, Provider import running, Order export running. As far as I understand, composite cron job is for splitting a whole process in an amount of smaller steps depending on the previous one. Here, the idea is simply to say: if we have 2 jobs running, the third will wait one of the two to be finished before executing...
As far as I understand, composite cron job is for splitting a whole process in an amount of smaller steps depending on the previous one.
I think it's not, here's what the article says:
When the CompositeCronJob is run, then the individual entries are executed sequentially and independently of one another, in the order specified by the compositeEntries attribute. If one entry has finished the execution, the next entry is executed, whether the finished entry has completed successfully or not.
You're right, but it means that the jobs must be in a row, no? I heve the problem that, for example, Lucene Index runs every day at 3 am (until 9am) Order export runs every 30 minutes Media load runs every 4 hours (for 1 hour or so) Provider import jobs are running every few hours for some time (depending on the provider and the amount of data) So it's not a good solution to gather all of those in one single "row", each must execute according to the needs...
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.