doc.silverstripe.org/app/code/UpdateDocsCronTask.php
David Alexander a398687756 add dev flag to keep full git repositories to enable local development
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
2016-03-28 01:03:03 -06:00

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);
}
}