Create a Cron to refresh Lifetime or Daily Statistics in Magento

时间:2017-05-03 14:28:54

标签: php magento cron

I wanna know how to create a cron to refresh the lifetime or daily stadistics in magento, I've read tons of pages about how to do that, but can't manage to work. Following this question:

Is it possible to refresh the Lifetime or Daily Statistics in magento with a cron?

My question is what should be put in the refresh_stadistics.php, or in any .php that is going to execute by the cron.

Thanks!

1 个答案:

答案 0 :(得分:0)

这是一个很好的例子。 http://inchoo.net/magento/creating-cron-script-in-magento/

您应该在模块的config.xml中为cron任务创建一条记录,然后创建一个PHP函数,该函数将触发统计计算。