MDL-11719 increased size of idnumber in user table - needed for some enrolment plugin...
[moodle.git] / search / cron_php5.php
CommitLineData
0a4c172c 1<?php
2/*
3* Moodle global search engine
4* This is a special externalized code for cron handling in PHP5.
5* Should never be called by a php 4.3.0 implementation.
6*/
3319ef85 7
0a4c172c 8try{
b0c3d06a 9 // overrides php limits
10 $maxtimelimit = ini_get('max_execution_time');
11 ini_set('max_execution_time', 300);
12 $maxmemoryamount = ini_get('memory_limit');
13 ini_set('memory_limit', '48M');
14
001f3652 15 mtrace("\n--DELETE----");
0a4c172c 16 require_once("$CFG->dirroot/search/delete.php");
17 mtrace("--UPDATE----");
18 require_once("$CFG->dirroot/search/update.php");
19 mtrace("--ADD-------");
20 require_once("$CFG->dirroot/search/add.php");
21 mtrace("------------");
001f3652 22 //mtrace("cron finished.</pre>");
23 mtrace('done');
b0c3d06a 24
25 // set back normal values for php limits
26 ini_set('max_execution_time', $maxtimelimit);
27 ini_set('memory_limit', $maxmemoryamount);
0a4c172c 28}
29catch(Exception $ex){
30 mtrace('Fatal exception from Lucene subsystem. Search engine may not have been updated.');
31 mtrace($ex);
32}
33?>