0
我创建了一个Magento扩展,每5分钟运行一次任务,使用Magento内置的cron功能,但是我无法完成它的工作。在Magento扩展中的Cron工作
我的扩展配置(ETC/config.xml中):
<config>
...
<crontab>
<jobs>
<featuredtopics_getnewtopics>
<schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
<run><model>featuredtopics/cron::getNewTopics</model></run>
</featuredtopics_getnewtopics>
</jobs>
</crontab>
</config>
我扩展的cron型号(型号/ Cron.php):
class Sodapop_Featuredtopics_Model_Cron {
public function getNewTopics() {
// Stuff
}
}
cron作业似乎开始就好了,它永远不会结束。我是否支持退货?
编辑 仔细检查后,我发现我的脚本中有错误。
感谢您的帮助,一些调试后,我发现我的脚本中有错误。 –