Jump to content

Google Sitemap Cronjob Setup in 1.5.2


Recommended Posts

Hi All

 

The instructions on the back office Google Sitemap Module Configuration says:

 

Use cron job to re-build the sitemap:

"http://mysite.com.au/modules/gsitemap/gsitemap-cron.php?&token=742dd6b674&GSITEMAP_ALL_CMS=0&GSITEMAP_ALL_PRODUCTS=0"

 

I set the cronjob up in my cPanel exactly as above:-

 

Minute Hour Day Month Weekday Command Actions

0 9 * * * "http://mysite.com.au/modules/gsitemap/gsitemap-cron.php?&token=742dd6b674&GSITEMAP_ALL_CMS=0&GSITEMAP_ALL_PRODUCTS=0"

I set up an email notification for each time it runs.

 

My host's Cron Daemon returns an error:

/bin/sh: "http://mysite.com.au...emap-cron.php?:" No such file or directory

 

Anyone have any ideas as to what needs to be changed to get it to run as it would be a very useful feature?

 

Thanks

deepee

Edited by deepee (see edit history)
Link to comment
Share on other sites

After some experimentation with cPanel's Cronjob builder it's as simple as putting the wget command and a single space in front of the URL in the Google Sitemap Module :

 

"wget http://mysite.com.au/modules/gsitemap/gsitemap-cron.php?&token=742dd6b674&GSITEMAP_ALL_CMS=0&GSITEMAP_ALL_PRODUCTS=0"

 

Hoping this helps some more people to get it working.

 

Cheers

deepee

  • Like 4
Link to comment
Share on other sites

  • 2 weeks later...

After some experimentation with cPanel's Cronjob builder it's as simple as putting the wget command and a single space in front of the URL in the Google Sitemap Module :

 

"wget http://mysite.com.au/modules/gsitemap/gsitemap-cron.php?&token=742dd6b674&GSITEMAP_ALL_CMS=0&GSITEMAP_ALL_PRODUCTS=0"

 

Hoping this helps some more people to get it working.

 

Cheers

deepee

 

 

Thank your 4 share.

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

The cPanel cronjobs ran inconsistently for me too.

 

I ended up bookmarking the cronjob URL in firefox and by just by clicking it, it would refresh the sitemap, e.g.:

http://mysite.com.au/modules/gsitemap/gsitemap-cron.php?&token=742dd6b674&GSITEMAP_ALL_CMS=0&GSITEMAP_ALL_PRODUCTS=0"

 

I now use a Firefox extension called "My Weekly Browsing Schedule" that visits the URL automatically on a user defined shedule, such as on startup.

https://addons.mozil...wsing-schedule/

 

It's a bit fiddly to set up initially but it works well.

Edited by deepee (see edit history)
  • Like 1
Link to comment
Share on other sites

Hello Everyone,

 

Following URL for my shop is not generating sitemap.xml correctly. It create an empty sitemap file. But when I click on the button to generate sitemap, it works fine? Any help?

I am using PrestaShop™ 1.5.3.1.

 

When I browse the following link it creates a sitemap.xml and when I click on the button it creates another sitemap-1.xml???? I have no idea whats going on...can someone shed some light on it please.......

 

http://mysite.com/modules/gsitemap/gsitemap-cron.php?&token=ce03751c73&GSITEMAP_ALL_CMS=0&GSITEMAP_ALL_PRODUCTS=0"

 

Thanks,

Bill

Edited by bilalhussain (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Here is a fix - working for me in 1.5.3.1

Line 208 of gsitemap.php

 

Replace this code:

$tmpLink = $this->context->link->getProductLink((int)($product['id_product']), $product['link_rewrite'], $product['category'], $product['ean13'], (int)($product['id_lang']));

 

With this code:

$tmpLink = $this->context->link->getProductLink((int)($product['id_product']), $product['link_rewrite'], $product['category'], $product['ean13'], (int)($product['id_lang']),null,0,true);

 

and use wget as instructed above

Link to comment
Share on other sites

I just upgraded PS to 1.5.4.0 and replace the gsitemap.php code as you instructed. Then I used the wget command instructed below but again it generated 0.000MB size with 0 indexed page.

 

note: I don't think upgrading PS to the latest version could cause any problem not to work your gsitemap replacement code.. just a thought..

 

 

After some experimentation with cPanel's Cronjob builder it's as simple as putting the wget command and a single space in front of the URL in the Google Sitemap Module :

 

"wget http://mysite.com.au/modules/gsitemap/gsitemap-cron.php?&token=742dd6b674&GSITEMAP_ALL_CMS=0&GSITEMAP_ALL_PRODUCTS=0"

 

Hoping this helps some more people to get it working.

 

Cheers

deepee

Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...
  • 1 year later...
  • 1 month later...
  • 4 months later...
×
×
  • Create New...