You are here

function simplesitemap_cron in Simple XML sitemap 8

Implements hook_cron.

File

./simplesitemap.module, line 113
Main module file containing hooks.

Code

function simplesitemap_cron() {
  $sitemap = new Simplesitemap();
  if ($sitemap
    ->get_setting('cron_generate')) {

    // Regenerate sitemap for all languages.
    $sitemap
      ->generate_sitemap();
  }
}