Reputation: 139
Is it possible to disable system crontab job (for example "catalog_product_index_price_reindex_all" from Mage_Catalog) via app/etc/local.xml
?
Upvotes: 2
Views: 5257
Reputation: 822
I'd say to avoid hacking the shell indexer or the core.
Create a custom module and rewrite the schedule to run for example on the 31st of February (which will never occur).
Or if you want to disable it globally, and avoid running it even when you really need a reindex all, then just overwrite the catalog/observer
observer model and add your reindexProductPrices()
method where you just return out of the method.
Upvotes: 3
Reputation: 3158
This is the solution, but you should rewrite the Mage/Catalog/etc/config.xml with your custom module
Fast Solution:
go to your core and delete the code
Example: app/code/core/Mage/Catalog/etc/config.xml
remove
<crontab>
<jobs>
<catalog_product_index_price_reindex_all>
<schedule>
<cron_expr>0 2 * * *</cron_expr>
</schedule>
<run>
<model>catalog/observer::reindexProductPrices</model>
</run>
</catalog_product_index_price_reindex_all>
</jobs>
</crontab>
Solution 2:
go to */shell/indexer.php
find this code near line 154
if ($this->getArg('reindex')) {
$processes = $this->_parseIndexerString($this->getArg('reindex'));
} else {
$processes = $this->_parseIndexerString('all');
}
comment the $processes = $this->_parseIndexerString('all');
to be
if ($this->getArg('reindex')) {
$processes = $this->_parseIndexerString($this->getArg('reindex'));
} else {
// $processes = $this->_parseIndexerString('all');
}
Upvotes: 0