Magento and Google Sitemap - Cron

On Magento and Cron setups, use cron.sh to do the triggering. Also I believe in Trust but verify which means set up cron and then actually view the cron job output table for proper runs.

Go into your Advanced System Config and set Cron Success History Lifetime and Failure Lifetime both to 1440 so you are monitoring a 24 hour span of time.

You will now be able to see index operations, etc in the time stream. There will be about 300 jobs listed in your Jobs Successful section over the 24 hour timespan.

Now run this cron log monitor to see if your cron really is running. I've run into many times when the person says it is, but then tries to verify it and finds that it pooped out after a couple tries.

The next issue is the statement But if I check the file /app/code/core/Mage/Sitemap/etc/config.xml it seems to be not updated. First, this is a configuration template, it will not update. The enable is done in the database. You check it in System -> Config -> Catalog -> Google Sitemap -> Generation Settings -> Enable = Yes should be the setting and once saved, stays on Yes. Magento consults this setting stored in the database, not the config.xml to actually run the sitemap generation.

Search Engine Optimization - Enable Autogenerated Sitemap

Now if you've got the sitemap properly created under Catalog -> Google Sitemap, the date/time stamp on your actual sitemap.xml file should start updating.


I don't see it mentioned on your question but, for cron jobs to work you have to setup the actual cron job for your magento install. Try adding either cron.php or cron.sh first to your crontab:

Example: cron.sh

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