每天多次运行 Magento 产品警报
是否可以每天多次运行 Magento 的产品警报? 我正在运行 v1.4.0.1,“系统”>“配置”>“目录”>“产品警报运行设置”中的频率选项仅降至“每日”。
如果可能的话我想每小时运行一次?
有人能告诉我该怎么做吗?
Is it possible to run Magento's product alerts more than once per day?
I'm running v1.4.0.1 and the frequency options found in System>Config>Catalog>Product Alerts Run Settings only goes down to Daily.
I would like to run it hourly if possible?
Anyone able to tell me how I can do this please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议您开始查看他的源模型...
Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency
....在那里您可以看到这3个常量...您将重写它并添加另一个常量,例如 const CRON_HOURLY = 'H';并且您必须重写/修改以下
Mage_Adminhtml_Model_System_Config_Backend_Product_Alert_Cron
来相应地构建 cron 表达式:)虽然我自己从未做过这件事,但我认为这会让您走上正确的轨道
HTH:)
I would suggest that you start looking at his source model ...
Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency
.... in there you can see those 3 constants ... you would have rewrite it and add another constant say const CRON_HOURLY = 'H';and than you would have to rewrite/modify the following
Mage_Adminhtml_Model_System_Config_Backend_Product_Alert_Cron
to build the cron expression accordingly :)Altough I have never done this exact thing myself I think this puts you on the right track
HTH :)