doc.silverstripe.org/app/code/UpdateDocsCronTask.php

27 lines
393 B
PHP

<?php
class UpdateDocsCronTask implements CronTask {
/**
*
* @return string
*/
public function getSchedule() {
return "0 20 * * *";
}
/**
*
* @return BuildTask
*/
public function process() {
//rebuild the docs
$docstask = new UpdateTask();
$docstask->run(null);
//reindex the search
$searchtask = new RebuildLuceneDocsIndex();
$searchtask->run(null);
}
}