diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index 0dace39db0..8cdc9c343a 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -1351,4 +1351,19 @@ class OStatusPlugin extends Plugin } return true; } + + public function onCronDaily() + { + try { + $sub = FeedSub::renewalCheck(); + } catch (NoResultException $e) { + common_log(LOG_INFO, "There were no expiring feeds."); + return; + } + + while ($sub->fetch()) { + common_log(LOG_INFO, "Renewing feed subscription\n\tExp.: {$sub->sub_end}\n\tFeed: {$sub->uri}\n\tHub: {$sub->huburi}"); + $sub->renew(); + } + } }