]> git.mxchange.org Git - friendica.git/blob - include/cronjobs.php
was a bit confusing for me or I was not sleeping to much ...
[friendica.git] / include / cronjobs.php
1 <?php
2 use \Friendica\Core\Config;
3
4 function cronjobs_run(&$argv, &$argc){
5         global $a;
6
7         require_once('include/datetime.php');
8         require_once('include/ostatus.php');
9         require_once('include/post_update.php');
10         require_once('mod/nodeinfo.php');
11
12         // No parameter set? So return
13         if ($argc <= 1)
14                 return;
15
16         // Check OStatus conversations
17         // Check only conversations with mentions (for a longer time)
18         if ($argv[1] == 'ostatus_mentions') {
19                 ostatus::check_conversations(true);
20                 return;
21         }
22
23         // Check every conversation
24         if ($argv[1] == 'ostatus_conversations') {
25                 ostatus::check_conversations(false);
26                 return;
27         }
28
29         // Call possible post update functions
30         // see include/post_update.php for more details
31         if ($argv[1] == 'post_update') {
32                 post_update();
33                 return;
34         }
35
36         // update nodeinfo data
37         if ($argv[1] == 'nodeinfo') {
38                 nodeinfo_cron();
39                 return;
40         }
41
42         return;
43 }