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