【发布时间】:2013-03-12 12:36:17
【问题描述】:
我需要每晚重新索引 Magento 中的所有产品。
我知道这可以通过以下方式实现: php /home/path/to/magento/shell/indexer.php 重新索引
但是如何将这个调用添加到 Magento 的内置 cron 机制中呢?
【问题讨论】:
我需要每晚重新索引 Magento 中的所有产品。
我知道这可以通过以下方式实现: php /home/path/to/magento/shell/indexer.php 重新索引
但是如何将这个调用添加到 Magento 的内置 cron 机制中呢?
【问题讨论】:
第 1 步:将 cron 设置为每 5 分钟或更高频率执行一次。
在 crontab 节点中: 0 2 * * * 目录/product_indexer_price::reindexAll
您将 cron_expr 中的 2 根据您的日值更改。
【讨论】: