-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathcron.php
33 lines (31 loc) · 913 Bytes
/
cron.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
<?php
/**
* This file provides cron functionality... Add it to your cron.
* @author Paul Bukowski <[email protected]>
* @copyright Copyright © 2006, Telaxus LLC
* @license MIT
* @version 1.0
* @package epesi-base
*/
define('CID',false);
define('SET_SESSION',false);
if(isset($argv))
define('EPESI_DIR','/');
require_once('include.php');
$lock = DATA_DIR.'/cron.lock';
if(file_exists($lock) && filemtime($lock)>time()-6*3600) die();
register_shutdown_function(create_function('','@unlink("'.$lock.'");'));
file_put_contents($lock,'');
set_time_limit(0);
ini_set('memory_limit', '512M');
ModuleManager::load_modules();
Base_AclCommon::set_user(1);
$ret = ModuleManager::call_common_methods('cron');
foreach($ret as $name=>$obj) {
if(!$obj) continue;
if(isset($argv))
print($name.":\n".strip_tags($obj)."\n\n");
else
print($name.":<br>".$obj."<hr>");
}
@unlink($lock);