用cron索引产品

时间:2013-03-11 18:13:18

标签: php magento cron

我需要每晚重新索引Magento的所有产品。

我知道这可以通过以下方式实现: php /home/path/to/magento/shell/indexer.php reindexall

但是如何将此调用添加到Magento中的内置cron机制?

1 个答案:

答案 0 :(得分:1)

  1. 步骤1:将cron设置为每5分钟或更高频率执行一次。

  2. 在crontab节点中:                                            0 2 * * *                                           目录/ product_indexer_price :: reindexAll                           

  3. 你根据你的日期值在cron_expr中更改2。