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 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂