forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cron_php5.php
37 lines (35 loc) · 1.1 KB
/
cron_php5.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/*
* Moodle global search engine
* This is a special externalized code for cron handling in PHP5.
* Should never be called by a php 4.3.0 implementation.
* @package search
* @category core
* @subpackage search_engine
* @author Michael Champanis (mchampan) [[email protected]], Valery Fremaux [[email protected]] > 1.8
* @date 2008/03/31
* @version prepared for 2.0
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
*/
try{
ini_set('max_execution_time', 300);
if (empty($CFG->extramemorylimit)) {
raise_memory_limit('128M');
} else {
raise_memory_limit($CFG->extramemorylimit);
}
mtrace("\n--DELETE----");
require_once($CFG->dirroot.'/search/delete.php');
mtrace("--UPDATE----");
require_once($CFG->dirroot.'/search/update.php');
mtrace("--ADD-------");
require_once($CFG->dirroot.'/search/add.php');
mtrace("------------");
//mtrace("cron finished.</pre>");
mtrace('done');
}
catch(Exception $ex){
mtrace('Fatal exception from Lucene subsystem. Search engine may not have been updated.');
mtrace($ex);
}
?>