开发者

How to setup magento cron job and init action of the controller?

开发者 https://www.devze.com 2023-02-25 00:01 出处:网络
As above, is there a way to do it? How can I define it in config.开发者_StackOverflowxml of my custom module?As far as I have ever seen, you cannot directly run controller actions in a cronjob, since

As above, is there a way to do it? How can I define it in config.开发者_StackOverflowxml of my custom module?


As far as I have ever seen, you cannot directly run controller actions in a cronjob, since that is not a terribly sensible thing to do outside of a user context. The easiest thing to do here is to put that functionality you need into a model and call that from the cronjob.

More information on the controller action you want to fire would be helpful in giving further advice.

Hope that helps!

Thanks, Joe

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号