2010-04-19 42 views
1

我想在目录模块的配置文件中设置cron作业以在不同的时间运行。目前,它是建立像这样在我的本地目录中已经作出过载在目录模块类在我自己的目录模块的config.xml中更新给定模块的config.xml中的Magento cron作业设置

<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> 

。我把下面我config.xml文件,但它从来没有被添加到cron计划表

<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> 

显然我试图做到这一点,每2分钟进行测试。或者更新配置文件的唯一方法是将其复制并放入本地/ Mage/...目录中?

回答

0

不要说这是一个缓存问题,清除缓存,它的工作。所以你可以使用你自己的目录模块来更新cron作业,但是我不确定这是否覆盖另一个,或者只是添加它,核心也将被运行,对于我正在做的,我没有关心。