是否可以使用cron刷新magento中的生命周期或每日统计信息?

编程入门 行业动态 更新时间:2024-10-12 20:25:00
本文介绍了是否可以使用cron刷新magento中的生命周期或每日统计信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

是否可以使用cron刷新生命周期"或每日统计"? 如果可能的话,怎么办?

Is it possible to refresh the Lifetime or Daily Statistics with a cron ? And if it is possible how ?

因为不是每个人在这里都有对magento的相同权限.

Because not everyone haves the same permissions in magento here.

预先感谢

推荐答案

您还可以在根目录中使用cron和php文件运行它.您可以在cron之外运行Shell脚本以刷新统计信息.

You can also run this with cron and a php file in the root. You can run a shell script off cron that refreshes the statistics.

这种方式是否有缺点?因为这比创建模块要容易得多,而且看起来尽可能简单.

Are there any disadvantages to this manner? As this is much easier than creating a module and seems as simple as possible.

您可能会遇到的一个问题是文件的权限,请确保chmod + x该文件.

One issue you may run into is permission for the file, be sure to chmod +x the file.

哦,其他重要的事情. pravams/2011/08/09/magento-refresh-statistics-automatically /将为您提供Mage_Shell_Abstract的出色的类扩展.

Oh, few other important things. pravams/2011/08/09/magento-refresh-statistics-automatically/ will give you an excellent class extension of Mage_Shell_Abstract to use.

在该文件中,请务必检查abstact.php的包含路径,它可能需要为shell/,然后使用shell脚本在文件的底部-确保文件名本身与该值匹配.显然,如果那是不正确的,那将是行不通的.

In that file be sure to check your abstact.php inclue path, it may need to be shell/, and then the usage of the shell script is at the bottom of the file- be sure your filename itself matches that value. Obviously it won't work if that is not correct.

还有一件事.如果无法从浏览器运行该文件,但是如果您不希望任何人看到它,则只需在htaccss中添加一个拒绝即可,当然是假设使用了Apache.

One more thing. If the file can't be ran from the browser, but if you don't want anyone to see it anyways... you just add an deny in the htaccss, assuming apache of course.

<Files refresh_statistics.php> order allow,deny deny from all </Files>

更多推荐

是否可以使用cron刷新magento中的生命周期或每日统计信息?

本文发布于:2023-10-08 14:55:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1472955.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:可以使用   统计信息   生命周期   magento   cron

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!