doujing5150 2010-04-19 15:22
浏览 64
已采纳

更新给定模块的config.xml中的Magento cron作业设置

I want to set the cron job in the config file of the Catalog module to be ran at a different time. Currently it is setup like this in the config.xml

 <crontab>
        <jobs>
            <catalog_product_index_price_reindex_all>
                <schedule><cron_expr>0 2 * * *</cron_expr></schedule>
                <run><model>catalog/product_indexer_price::reindexAll</model></run>
            </catalog_product_index_price_reindex_all>
        </jobs>
    </crontab>

I have already made overloads to classes in the Catalog Module in my own Catalog Module in the local directory. I put the following in my config.xml file but it never gets added to the cron schedule table

<crontab>
        <jobs>
            <catalog_product_index_price_reindex_all>
                <schedule><cron_expr>*/2 * * * *</cron_expr></schedule>
                <run><model>catalog/product_indexer_price::reindexAll</model></run>
            </catalog_product_index_price_reindex_all>
        </jobs>
    </crontab>

Obviously I am trying to do it every 2 minutes for testing. Or is the only way to update the config files is to copy it and put it in a local/Mage/... directory?

  • 写回答

1条回答 默认 最新

  • douweiduo7526 2010-04-19 15:27
    关注

    Nevermind it was a cache issue, cleared cache and it worked. So you can just use your own Catalog Module to update the cron jobs, however I am not sure if this overwrites the other one or just adds it and the core one will also be ran, which for what I am doing, I don't care.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 宇视监控服务器无法登录
  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥15 DruidDataSource一直closing
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥50 power BI 从Mysql服务器导入数据,但连接进去后显示表无数据