• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Cronjob for creating sitemap

Cronjob for creating sitemap 12 years 9 months ago #14245

Hello,

Is it possible to set a cronjob for creating sitemap automatically?
Which file should be executed?

Tnx
The administrator has disabled public write access.

Re:Cronjob for creating sitemap 12 years 9 months ago #14349

  • bogdanc
  • bogdanc's Avatar
  • OFFLINE
  • Moderator
  • Posts: 669
  • Thank you received: 11
Hello,

Unfortunately this feature is not available in RSSEO! and so this cannot be achieved in the current version of the component.
The administrator has disabled public write access.

Re:Cronjob for creating sitemap 12 years 8 months ago #14645

  • cvoogt
  • cvoogt's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 12
This is not hard to code.
Save this as a PHP file somewhere on your hosting account e.g. at /public_html/rsseo-sitemap.php;
<?php
 
define( '_JEXEC', 1 );
define( '_VALID_MOS', 1 );
define( 'JPATH_BASE', realpath(dirname(__FILE__) .'/' ) );
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$mainframe = JFactory::getApplication('site');
$mainframe->initialise();
$cid = $_GET['cid'];
 
$pages = mysql_query("SELECT IdPage FROM jos_rsseo_pages WHERE published=1");
while($page = mysql_fetch_array( $pages )){
//	listItemTask('cb17','insitemap')
//PageTitle
//print $page['IdPage']." - ".$page['PageTitle']."<hr>";
 
$query = 'UPDATE jos_rsseo_pages SET PageInSitemap = 1 WHERE IdPage = '. $page['IdPage'];
//mysql_query($query) or die ("Error in query: $query. ".mysql_error());
mysql_query($query);
}
 
?>


Then add a cron job;
wget -O - -q -t 1 "http://www.myawesomesite.com/rsseo-sitemap.php"
Last Edit: 12 years 8 months ago by cvoogt.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!