【问题标题】:Index products with cron使用 cron 索引产品
【发布时间】:2013-03-12 12:36:17
【问题描述】:

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

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

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

【问题讨论】:

    标签: php magento cron


    【解决方案1】:
    1. 第 1 步:将 cron 设置为每 5 分钟或更高频率执行一次。

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

    您将 cron_expr 中的 2 根据您的日值更改。

    【讨论】:

    • 它在 xml 文件中。如果您有完整的代码集,只需在 xml 文件中搜索 crontab。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-10-23
    • 1970-01-01
    • 2019-02-14
    • 1970-01-01
    • 1970-01-01
    • 2020-04-29
    • 1970-01-01
    相关资源
    最近更新 更多