protected function completeJob() {

		$content = '<?xml version="1.0" encoding="UTF-8"?>'.
					'<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
		$content .= file_get_contents($this->tempFile);
		$content .= '</urlset>';

		$sitemap = Director::baseFolder() .'/sitemap.xml';
		
		file_put_contents($sitemap, $content);

		if (file_exists($this->tempFile)) {
			unlink($this->tempFile);
		}

		$nextgeneration = new GeneratePostSitemapJob();
		singleton('QueuedJobService')->queueJob($nextgeneration, date('Y-m-d H:i:s', time() + self::$regenerate_time));
	}