Run an magento function cron at every hour

本秂侑毒 提交于 2019-12-09 23:57:21

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/21374844/run-an-magento-function-cron-at-every-hour

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!