Magento google sitemap and cron

I am having trouble automatically creating a Google Sitemap. Here is what I did to enable it:

  • Swipe the hourly cron that starts (cron.sh that works) cron.php

  • Install System-> Configuration-> Google Sitemap-> Generation Settings-> Enabled to Yes

  • Created by Google Sitemap in Directory-> Google Map

When I manually create a sitemap, it works great. Cron also works without errors. Am I missing a step?

+1
source share
1 answer

Cronjob setup

  • Add cronjob to Linux server. Either through SSH or through directadmin. I let it work every 30 minutes.

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

  • Go to the root of magento, where cron.sh is found. Through SSH Execution

chmod + x cron.sh

<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> 
  • Go to the rigth file and find the words CRON. Basically you will find that the elements are already defined. Here you can change your wishes.

  • For the Sitemap, do the same as above. But also look for the word ENABLE in the config.xml file. This should 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> 

Hope this helps

+4
source

Source: https://habr.com/ru/post/916105/


All Articles