]> git.mxchange.org Git - friendica.git/blob - include/cronhooks.php
split off facebook and other cron hooks from poller
[friendica.git] / include / cronhooks.php
1 require_once("boot.php");
2
3
4 function cronhooks_run($argv, $argc){
5         global $a, $db;
6
7         if(is_null($a)) {
8                 $a = new App;
9         }
10   
11         if(is_null($db)) {
12             @include(".htconfig.php");
13         require_once("dba.php");
14             $db = new dba($db_host, $db_user, $db_pass, $db_data);
15         unset($db_host, $db_user, $db_pass, $db_data);
16         };
17
18         require_once('include/session.php');
19         require_once('include/datetime.php');
20
21         load_config('config');
22         load_config('system');
23
24         $a->set_baseurl(get_config('system','url'));
25
26         load_hooks();
27
28         logger('cronhooks: start');
29         
30
31         $d = datetime_convert();
32
33         call_hooks('cron', $d);
34
35         return;
36 }
37
38 if (array_search(__file__,get_included_files())===0){
39   cronhooks_run($argv,$argc);
40   killme();
41 }