3 * GNU social cronish plugin, to imitate cron actions
7 * @author Mikael Nordfeldth <mmn@hethane.se>
8 * @copyright 2013 Free Software Foundation, Inc.
9 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
10 * @link http://www.gnu.org/software/social/
13 class CronishPlugin extends Plugin {
14 public function onCronMinutely()
16 common_debug('CRON: Running minutely cron job!');
19 public function onCronHourly()
21 common_debug('CRON: Running hourly cron job!');
24 public function onCronDaily()
26 common_debug('CRON: Running daily cron job!');
29 public function onCronWeekly()
31 common_debug('CRON: Running weekly cron job!');
35 * When the page has finished rendering, let's do some cron jobs
36 * if we have the time.
38 public function onEndActionExecute($status, Action $action)
40 $cron = new Cronish();
41 $cron->callTimedEvents();
46 public function onPluginVersion(&$versions)
48 $versions[] = array('name' => 'Cronish',
49 'version' => GNUSOCIAL_VERSION,
50 'author' => 'Mikael Nordfeldth',
51 'homepage' => 'http://www.gnu.org/software/social/',
53 // TRANS: Plugin description.
54 _m('Cronish plugin that executes events on a near-hour/day/week basis.'));