X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=statistics_json%2Fstatistics_json.php;h=494904ba1401c0f9ab4a4b81efd3448ce23b9c84;hb=179b19473cd5c88f9a7236e26c151ecdd46a609f;hp=e29d7422890630c39a63036abc874b3ac49bb4b2;hpb=b629aae1c66c365726d3d421113edcdc1c087c5c;p=friendica-addons.git diff --git a/statistics_json/statistics_json.php b/statistics_json/statistics_json.php index e29d7422..494904ba 100644 --- a/statistics_json/statistics_json.php +++ b/statistics_json/statistics_json.php @@ -42,11 +42,11 @@ function statistics_json_cron($a,$b) { $last = get_config('statistics_json','last_calucation'); if($last) { - // Calculate all 3 hours - $next = $last + (180 * 60); + // Calculate every 24 hours + $next = $last + (24 * 60 * 60); if($next > time()) { logger('statistics_json_cron: calculation intervall not reached'); - // return; + return; } } logger('statistics_json_cron: cron_start'); @@ -102,6 +102,12 @@ function statistics_json_cron($a,$b) { logger('statistics_json_cron: local_posts: '.$local_posts, LOGGER_DEBUG); + // Now trying to register + $url = "http://pods.jasonrobinson.me/register/".$a->get_hostname(); + logger('statistics_json_cron: registering url: '.$url, LOGGER_DEBUG); + $ret = fetch_url($url); + logger('statistics_json_cron: registering answer: '.$ret, LOGGER_DEBUG); + logger('statistics_json_cron: cron_end'); set_config('statistics_json','last_calucation', time()); }