123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- if (!defined('GNUSOCIAL')) { exit(1); }
- class CronishPlugin extends Plugin {
- public function onCronMinutely()
- {
- common_debug('CRON: Running near-minutely cron job!');
- }
- public function onCronHourly()
- {
- common_debug('CRON: Running near-hourly cron job!');
- }
- public function onCronDaily()
- {
- common_debug('CRON: Running near-daily cron job!');
- }
- public function onCronWeekly()
- {
- common_debug('CRON: Running near-weekly cron job!');
- }
-
- public function onEndActionExecute($status, Action $action)
- {
- $cron = new Cronish();
- $cron->callTimedEvents();
- return true;
- }
- public function onPluginVersion(&$versions)
- {
- $versions[] = array('name' => 'Cronish',
- 'version' => GNUSOCIAL_VERSION,
- 'author' => 'Mikael Nordfeldth',
- 'homepage' => 'http://www.gnu.org/software/social/',
- 'description' =>
-
- _m('Cronish plugin that executes events on a near-minutely/hour/day/week basis.'));
- return true;
- }
- }
|