Now the block->cron attribute is updated in the block table both
[moodle.git] / search / cron.php
CommitLineData
d9e1bf24 1<?php
2
791a4cec 3 /* cron script to perform all the periodic search tasks
eef868d1 4 *
791a4cec 5 * delete.php
6 * updates the index by pruning deleted documents
eef868d1 7 *
791a4cec 8 * update.php
9 * updates document info in the index if the document has been modified since indexing
eef868d1 10 *
791a4cec 11 * add.php
12 * adds documents created since the last index run
13 */
14
d9e1bf24 15 require_once('../config.php');
16 require_once("$CFG->dirroot/search/lib.php");
eef868d1 17
721d74b0 18 if (empty($CFG->enableglobalsearch)) {
19 error('Global searching is not enabled.');
20 }
21
d9e1bf24 22 mtrace("<pre>Starting cron...\n");
eef868d1 23
6f1b1da1 24 mtrace("--DELETE----");
25 require_once("$CFG->dirroot/search/delete.php");
26 mtrace("--UPDATE----");
27 require_once("$CFG->dirroot/search/update.php");
28 mtrace("--ADD-------");
29 require_once("$CFG->dirroot/search/add.php");
30 mtrace("------------");
d9e1bf24 31
6f1b1da1 32 mtrace("cron finished.</pre>");
d9e1bf24 33
34?>