/** * function action_plugin_activation * Registers an EventLog module and cron job for this plugin * @param string The name of the plugin that is being activated **/ public function action_plugin_activation($file) { if (realpath($file) == __FILE__) { EventLog::register_type('authentification', 'persistence'); CronTab::add_hourly_cron('persistence', 'persistence', 'Clean up stale persistent cookies'); } }
/** * */ public function action_plugin_activation($file) { if (realpath($file) == __FILE__) { Modules::add('Incoming Links'); // Add a periodical execution event to be triggered hourly CronTab::add_hourly_cron('incoming_links', 'incoming_links', 'Find links to this blog.'); } }
public function action_plugin_activation($file) { if (realpath($file) == __FILE__) { Session::notice(_t('Please set your Mollom API Keys in the configuration.', 'mollom')); Options::set('mollom__public_key', ''); Options::set('mollom__private_key', ''); Options::set('mollom__servers', array()); CronTab::add_weekly_cron('mollom_server_list', 'mollom_update_server_list_cron', 'Cron job to update mollom server list every week'); CronTab::add_hourly_cron('mollom_stats', 'mollom_update_stats_cron', 'Cron job to update mollom stats every hour'); } }
/** * Run activation routines, and setup default options. */ public function action_plugin_activation() { if (!CronTab::get_cronjob('blogroll:update')) { CronTab::add_hourly_cron('blogroll:update', 'blogroll_update_cron', 'Updates the blog updated timestamp from weblogs.com'); } Options::set('blogroll__api_version', self::API_VERSION); Options::set('blogroll__use_updated', true); Options::set('blogroll__max_links', '10'); Options::set('blogroll__sort_by', 'id'); Options::set('blogroll__direction', 'ASC'); Options::set('blogroll__list_title', 'Blogroll'); Post::add_new_type(self::CONTENT_TYPE); // Give anonymous users access, if the group exists $group = UserGroup::get_by_name('anonymous'); if ($group) { $group->grant(self::CONTENT_TYPE, 'read'); } }
public function updated_config($ui) { $ui->save(); // if they selected an option other than manually, set up the cron $frequency = Options::get('exportsnapshot__frequency'); // delete the crontab entry, if there is one CronTab::delete_cronjob('snapshot'); switch ($frequency) { case 'manually': // do nothing break; case 'hourly': CronTab::add_hourly_cron('snapshot', array('ExportSnapshot', 'run'), _t('Hourly Export Snapshot', 'exportsnapshot')); break; case 'daily': CronTab::add_daily_cron('snapshot', array('ExportSnapshot', 'run'), _t('Daily Export Snapshot', 'exportsnapshot')); break; case 'weekly': CronTab::add_weekly_cron('snapshot', array('ExportSnapshot', 'run'), _t('Weekly Export Snapshot', 'exportsnapshot')); break; case 'monthly': CronTab::add_monthly_cron('snapshot', array('ExportSnapshot', 'run'), _t('Monthly Export Snapshot', 'exportsnapshot')); break; } return false; }
public function upgrade_db_post_5111() { // add the cronjob to perform garbage collection on sessions CronTab::add_hourly_cron('session_gc', Method::create('\\Habari\\Session', 'gc'), _t('Perform session garbage collection.')); }
public function action_plugin_activation($file) { if (Plugins::id_from_file($file) == Plugins::id_from_file(__FILE__)) { CronTab::add_hourly_cron('update_rrs_blocks', 'rssblocks_update'); } }
function action_plugin_activation($file) { Modules::add('123LinkIt'); CronTab::add_hourly_cron('linkit_fetch', 'linkit_fetch', _t('Fetches the statistical data from the 123LinkIt site.', 'linkit')); }
/** * Perform actions when the admin plugin form is successfully submitted. * * @param FormUI $ui The form that successfully completed * @return boolean True if the normal processing should occur to save plugin options from the form to the database */ public function updated_config($ui) { $ui->save(); // Delete the cached feed data DB::query('TRUNCATE {feedlist}'); // Reset the cronjob so that it runs immediately with the change CronTab::delete_cronjob('feedlist'); CronTab::add_hourly_cron('feedlist', 'load_feeds', 'Load feeds for feedlist plugin.'); return false; }
/** * */ public function action_plugin_activation($file) { // Add a periodical execution event to be triggered hourly CronTab::add_hourly_cron('incoming_links', 'incoming_links', 'Find links to this blog.'); }
public function action_plugin_activation() { // a cronjob to fetch the data from last.fm CronTab::add_hourly_cron('lastrecent', 'lastrecent', _t('Fetch recent tracks from last.fm', 'lastrecent')); }