Magento 1.9 – Which Job Resets Catalog Rule Rules Daily?

catalog-rulescronmagento-1.9

We have disabled catalogrule_apply_all Magento cronjob, because of multi-environment system (to simplify things: let's say we have 1 staging server & 1 production server) in one of our customer. Catalogrule refresh process is done only in one environment (staging), and then we pass database data through a system process from that environment to others (production)

Problem is we have some days when we don't pass data between environments, and then the catalogrule refresh is not executed, but Magento does the reset in production environment.

Somebody here know which concrete Magento cron task does that daily reset? Or maybe this is not done by any cronjob, so the problem is the catalogrule refresh is simply required to be executed every day, even if there aren't any changes in active catalogrule rules?

UPDATE
I suspect this is the cause, can somebody confirm that?

<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>

Best Answer

There is no cron job which "reset" catalog rules, but price generated by "catalogrule/observer::dailyCatalogUpdate" for the next day only.

So, if you have disabled this cron task - and it will miss a day - prices won't be renewed.

you can check DB table "catalogrule_product_price" - there is the "rule_date" field which showing which date you have rules generated for.

Related Topic