每小时运行一次magento函数cron [英] Run an magento function cron at every hour
本文介绍了每小时运行一次magento函数cron的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想运行一个magento函数,将运行在每个小时,我在config.xml中编写代码,但我没有working.here代码是
< crontab>
< jobs>
< stockalert_autosend>
< schedule>< cron_expr> ** / 1 * * *< / cron_expr>< / schedule>
< run>< model> stockalert / observer :: backinstock< / model>< / run>
< / stockalert_autosend>
< / jobs>
< / crontab>
请帮助我。
解决方案
每小时使用此cron表达式:
< cron_expr> 0 * * * *< / cron_expr>
这将使它在 12.00
1.00
等。
如果您要在 12.30
, 1.30
等等用 30
替换 0
b $ b
I want to run an magento function that would run at every hour , i am written code in config.xml but i did not working.here the code is
<crontab>
<jobs>
<stockalert_autosend>
<schedule><cron_expr>**/1 * * *</cron_expr></schedule>
<run><model>stockalert/observer::backinstock</model></run>
</stockalert_autosend>
</jobs>
</crontab>
Please help me
解决方案
Use this cron expression for each hour:
<cron_expr>0 * * * *</cron_expr>
This will make it run at 12.00
, 1.00
and so on.
If you want to make it run at 12.30
, 1.30
and so on replace 0
with 30
这篇关于每小时运行一次magento函数cron的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文