Magento Google网站地图和Cron [英] Magento google sitemap and cron

查看:95
本文介绍了Magento Google网站地图和Cron的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法自动生成Google Sitemap.为此,我做了以下操作:

I am having trouble getting the Google Sitemap to automatically generate. Here’s what I have done to enable it:

  • 每小时都有一个cron运行(cron.sh运行)cron.php

  • Have an hourly cron that runs (cron.sh, that runs) cron.php

将系统"->配置"->"Google Sitemap"->生成设置"->启用"设置为是"

Set System->Configuration->Google Sitemap->Generation Settings->Enabled to "Yes"

在目录-> Google Sitemap中创建了Google Sitemap

Created a Google Sitemap in Catalog->Google Sitemap

当我手动生成站点地图时,它的效果很好. cron也可以正常工作.我错过了一步吗?

When I manually generate the sitemap, it works great. The cron is also working without errors. Am I missing a step?

推荐答案

设置cronjob

  • 将cronjob添加到Linux服务器.通过SSH或通过directadmin.我让它每30分钟运行一次.

*/30 * * * */home/shirts01/public_html/cron.sh

*/30 * * * * /home/shirts01/public_html/cron.sh

  • 转到找到cron.sh的magento根目录.通过SSH执行
  • chmod + x cron.sh

    chmod +x cron.sh

    • 转到应用程序/代码/核心/法师/.在这里您可以找到所有自动化部分.阅读本文,然后在下面您可以找到如何以及如何计划.请注意,这些元素都可以在config.xml的het/etc文件夹中的app/code/core/Mage/CatalogRule/etc/config.xml等部分下找到:(此处为CatalogRule)

      • Go to app/code/core/Mage/. Here you can find alle the automated sections. Read this article and below you can find how and what you can plan. Be aware that these elements are all found in het /etc folder in config.xml under a section like app/code/core/Mage/CatalogRule/etc/config.xml: (here it is CatalogRule)

        http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/how_to_setup_a_cron_job

        <crontab>
        <jobs>
          <catalogrule_apply_all>
              <schedule><cron_expr>0 1 * * *</cron_expr></schedule>
              <run><model>catalogrule/observer::dailyCatalogUpdate</model></run>
          </catalogrule_apply_all>
        </jobs>
        </crontab>
        

        • 转到rigth文件并查找单词CRON.通常,您会发现元素已经定义.在这里您可以改变自己的愿望.

          • Go to the rigth file and lookup for the words CRON. Mostly you will find the elements are already defined. Here you can alter to your wishes.

            对于站点地图,请执行与上述相同的操作.但还要在config.xml中查找单词ENABLE.必须将其设置为1(默认为0)

            For sitemap do the same as above. But also look for the word ENABLE in the config.xml. This has to be set to 1 (and defaults to 0)

                    <generate>
                        <enabled>1</enabled>
                        <error_email><![CDATA[]]></error_email>
                        <error_email_template>sitemap_generate_error_email_template</error_email_template>
                        <error_email_identity>general</error_email_identity>
                    </generate>
            

            希望这会有所帮助

            这篇关于Magento Google网站地图和Cron的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆