3 require_once("boot.php");
6 function cronhooks_run(&$argv, &$argc){
14 @include(".htconfig.php");
15 require_once("include/dba.php");
16 $db = new dba($db_host, $db_user, $db_pass, $db_data);
17 unset($db_host, $db_user, $db_pass, $db_data);
20 require_once('include/session.php');
21 require_once('include/datetime.php');
22 require_once('include/pidfile.php');
24 load_config('config');
25 load_config('system');
27 $lockpath = get_config('system','lockpath');
28 if ($lockpath != '') {
29 $pidfile = new pidfile($lockpath, 'cron.lck');
30 if($pidfile->is_already_running()) {
31 logger("cronhooks: Already running");
36 $a->set_baseurl(get_config('system','url'));
40 logger('cronhooks: start');
43 $d = datetime_convert();
45 call_hooks('cron', $d);
50 if (array_search(__file__,get_included_files())===0){
51 cronhooks_run($argv,$argc);