Magento and Google Sitemap - Cron

I am new to Magento. I am trying to customize a Google generated map. I read everywhere how to configure cron for Magento using cPanel, how to configure from a backend, etc.

My current settings: under System → Configuration → Google sitemap → Generation settings → Enabled = YES. I create a site map in the Catalog → Google Sitemap, of course, which I can create without any problems.

But if I check the file /app/code/core/Mage/Sitemap/etc/config.xml , it does not seem to be updated (other contents are btw config.xml and backend). It seems that the latest file system update was prevailing on 04/20/2012, and not today. (I also run Fluch Magento and Storage Cache)

<generate> <enabled>0</enabled> <error_email/> <error_email_template>sitemap_generate_error_email_template</error_email_template> <error_email_identity>general</error_email_identity> </generate> 

Can someone help me? Thanks!

+6
source share
3 answers

In the Magento and Cron settings, use cron.sh to run. I also believe in Trust, but check what it means to create a cron and then the actual presentation of the cron job's output table for the correct runs.

Go into your advanced system configuration and set the life and runtime of the Cron Success History to 1440 so that you control the 24-hour period.

Now you can see index operations, etc. in the flow of time. There will be 300 assignments listed in the Successful Jobs section within 24 hours.

Now run this cron log monitor to see if your cron is working. I have come across many times when a person says that this is so, but then he tries to check it and discovers that it flew out after the couple tried.

The next problem is the statement. But if I check the file /app/code/core/Mage/Sitemap/etc/config.xml, it does not seem to be updated. Firstly, this is a configuration template, it will not be updated. Permission is included in the database. You check it in System -> Config -> Catalog -> Google Sitemap -> Generation Settings -> Enable = Yes should be a setting and after saving, it remains on Yes. Magento advises this parameter, which is stored in the database, rather than the config.xml file to actually run the generation of the Sitemap.

Search Engine Optimization - Enable Autogenerated Sitemap

Now, if you created the Sitemap correctly in the directory → Google Sitemap, the date / time stamp in your actual sitemap.xml should start with the update.

+7
source

I don't see a mention in your question, but for cron to work, you need to configure the actual cron job to install magento. Try adding cron.php or cron.sh to your crontab first:

Example: cron.sh

 */5 * * * * /bin/sh /absolute/path/to/magento/cron.sh 
+2
source

Mauro

XML is only the default data that was once stored in the administrator and enters the database, and this is the end of the whole source from there, see SELECT * FROM core_config_data WHERE path LIKE "sitemap/generate/time"; for runtime or SELECT * FROM core_config_data WHERE path LIKE 'sitemap/%'; for a general view of all the parameters that were set to generate a Sitemap in Magento.

As Seth also pointed out, you will need to have

*/5 * * * * /bin/sh /absolute/path/to/magento/cron.sh

in crontab your webusers

+1
source

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


All Articles