From: Mikael Nordfeldth Date: Wed, 20 Nov 2013 22:03:40 +0000 (+0100) Subject: Cronish jobs by the minute. These run very often! X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=710eac403c851864b9532ef2717baafb2e7f46e8;p=quix0rs-gnu-social.git Cronish jobs by the minute. These run very often! Minutely will NOT necessarily run by the minute, because it depends on site visitors. Busy sites will be able to do this, but sites where the visitors (or search engine stuff or api calls) are more than a minute apart, the interval will be much larger. --- diff --git a/plugins/Cronish/CronishPlugin.php b/plugins/Cronish/CronishPlugin.php index b0c0095542..0b17fd3660 100644 --- a/plugins/Cronish/CronishPlugin.php +++ b/plugins/Cronish/CronishPlugin.php @@ -1,6 +1,21 @@ + * @copyright 2013 Free Software Foundation, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 + * @link http://www.gnu.org/software/social/ + */ class CronishPlugin extends Plugin { + public function onCronMinutely() + { + common_debug('CRON: Running minutely cron job!'); + } + public function onCronHourly() { common_debug('CRON: Running hourly cron job!'); diff --git a/plugins/Cronish/lib/cronish.php b/plugins/Cronish/lib/cronish.php index c7d79eeb5f..5889b079f4 100644 --- a/plugins/Cronish/lib/cronish.php +++ b/plugins/Cronish/lib/cronish.php @@ -23,7 +23,8 @@ class Cronish */ public function callTimedEvents() { - $timers = array('hourly' => 3600, + $timers = array('minutely' => 60, // this is NOT guaranteed to run every minute (only on busy sites) + 'hourly' => 3600, 'daily' => 86400, 'weekly' => 604800);