mirror of
https://github.com/silverstripe/doc.silverstripe.org
synced 2024-10-22 17:05:50 +02:00
a398687756
whitespace whitespace added class variable to hold request whitespace adjusted comments; changed variable name added $request variable to UpdateDocsCronTask whitespace more whitespace updated README updated README tidy up
36 lines
712 B
PHP
36 lines
712 B
PHP
<?php
|
|
|
|
class UpdateDocsCronTask implements CronTask
|
|
{
|
|
/**
|
|
* @var SS_HTTPRequest $request The request object the controller was called with.
|
|
*/
|
|
protected $request = null;
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getSchedule()
|
|
{
|
|
return "0 20 * * *";
|
|
}
|
|
|
|
/**
|
|
* @return BuildTask
|
|
*/
|
|
public function process()
|
|
{
|
|
|
|
$this->request = Controller::curr()->getRequest();
|
|
|
|
//refresh markdown files
|
|
$refresh_task = new RefreshMarkdownTask();
|
|
$refresh_task->run($this->request);
|
|
|
|
//reindex markdown files
|
|
$reindex_task = new RebuildLuceneDocsIndex();
|
|
$reindex_task->run($this->request);
|
|
|
|
}
|
|
}
|