当前位置: 首页>>代码示例>>PHP>>正文


PHP Tinebase_Core::getScheduler方法代码示例

本文整理汇总了PHP中Tinebase_Core::getScheduler方法的典型用法代码示例。如果您正苦于以下问题:PHP Tinebase_Core::getScheduler方法的具体用法?PHP Tinebase_Core::getScheduler怎么用?PHP Tinebase_Core::getScheduler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tinebase_Core的用法示例。


在下文中一共展示了Tinebase_Core::getScheduler方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: tearDown

 /**
  * tears down the fixture
  */
 public function tearDown()
 {
     // remove all tasks
     $scheduler = Tinebase_Core::getScheduler();
     $scheduler->getBackend()->saveQueue();
     // init default tasks
     Tinebase_Scheduler_Task::addAlarmTask($scheduler);
     Tinebase_Scheduler_Task::addCacheCleanupTask($scheduler);
     Tinebase_Scheduler_Task::addCredentialCacheCleanupTask($scheduler);
     Tinebase_Scheduler_Task::addTempFileCleanupTask($scheduler);
     Tinebase_Scheduler_Task::addDeletedFileCleanupTask($scheduler);
 }
开发者ID:rodrigofns,项目名称:ExpressoLivre3,代码行数:15,代码来源:SchedulerTest.php

示例2: _initializeSchedulerTasks

 /**
  * init scheduler tasks
  */
 protected function _initializeSchedulerTasks()
 {
     $scheduler = Tinebase_Core::getScheduler();
     Calendar_Scheduler_Task::addUpdateConstraintsExdatesTask($scheduler);
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:8,代码来源:Initialize.php

示例3: update_6

 /**
  * update to 5.7
  * - add deleted file cleanup task to scheduler
  */
 public function update_6()
 {
     $scheduler = Tinebase_Core::getScheduler();
     Tinebase_Scheduler_Task::addDeletedFileCleanupTask($scheduler);
     $this->setApplicationVersion('Tinebase', '5.7');
 }
开发者ID:,项目名称:,代码行数:10,代码来源:

示例4: _initializeSchedulerTasks

 /**
  * init scheduler tasks
  */
 protected function _initializeSchedulerTasks()
 {
     $scheduler = Tinebase_Core::getScheduler();
     Tinebase_Scheduler_Task::addAlarmTask($scheduler);
     Tinebase_Scheduler_Task::addCacheCleanupTask($scheduler);
     Tinebase_Scheduler_Task::addCredentialCacheCleanupTask($scheduler);
     Tinebase_Scheduler_Task::addTempFileCleanupTask($scheduler);
     Tinebase_Scheduler_Task::addDeletedFileCleanupTask($scheduler);
 }
开发者ID:,项目名称:,代码行数:12,代码来源:

示例5: _sendAlarm

 /**
  * send alarm via scheduler
  */
 protected function _sendAlarm()
 {
     $scheduler = Tinebase_Core::getScheduler();
     $scheduler->addTask('Tinebase_Alarm', $this->_createTask());
     try {
         $scheduler->run();
     } catch (Tinebase_Exception $te) {
         // do nothing
     }
 }
开发者ID:bitExpert,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:13,代码来源:JsonTest.php

示例6: _uninitializeSchedulerTasks

 /**
  * uninit scheduler tasks
  */
 protected function _uninitializeSchedulerTasks()
 {
     $scheduler = Tinebase_Core::getScheduler();
     Sales_Scheduler_Task::removeUpdateProductLifespanTask($scheduler);
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:8,代码来源:Uninitialize.php

示例7: update_6

 /**
  * update to 9.7
  *
  * add rrule_constraints background job
  */
 public function update_6()
 {
     $scheduler = Tinebase_Core::getScheduler();
     Calendar_Scheduler_Task::addUpdateConstraintsExdatesTask($scheduler);
     $this->setApplicationVersion('Calendar', '9.7');
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:11,代码来源:Release9.php

示例8: update_21

 /**
  * update to 8.22
  *
  * @see 0010766: set product lifespan
  */
 public function update_21()
 {
     if (!$this->_backend->columnExists('lifespan_end', 'sales_products')) {
         $declarations = array(new Setup_Backend_Schema_Field_Xml('<field>
                     <name>lifespan_start</name>
                     <type>datetime</type>
                 </field>'), new Setup_Backend_Schema_Field_Xml('<field>
                     <name>lifespan_end</name>
                     <type>datetime</type>
                 </field>'), new Setup_Backend_Schema_Field_Xml('<field>
                     <name>is_active</name>
                     <type>boolean</type>
                     <default>false</default>
                 </field>'));
         foreach ($declarations as $declaration) {
             try {
                 $this->_backend->addCol('sales_products', $declaration);
             } catch (Zend_Db_Statement_Exception $zdse) {
                 Tinebase_Exception::log($zdse);
             }
         }
         $this->setTableVersion('sales_products', 5);
     }
     // add hourly async job
     $scheduler = Tinebase_Core::getScheduler();
     Sales_Scheduler_Task::addUpdateProductLifespanTask($scheduler);
     $this->setApplicationVersion('Sales', '8.22');
 }
开发者ID:bitExpert,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:33,代码来源:Release8.php

示例9: update_24

 /**
  * update to 3.25
  * - remove action queue task -> it's now a seperate cli method for a seperate cronjob
  */
 public function update_24()
 {
     $scheduler = Tinebase_Core::getScheduler();
     $scheduler->removeTask('Tinebase_ActionQueue');
     $scheduler->saveTask();
     $this->setApplicationVersion('Tinebase', '3.25');
 }
开发者ID:,项目名称:,代码行数:11,代码来源:

示例10: update_3

 /**
  * update to 6.4
  * - add credential cache cleanup task to scheduler
  */
 public function update_3()
 {
     Tinebase_Scheduler_Task::addSessionsCleanupTask(Tinebase_Core::getScheduler());
     $this->setApplicationVersion('Tinebase', '6.4');
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:9,代码来源:Release6.php

示例11: update_5


//.........这里部分代码省略.........
                     <length>80</length>
                 </field>
                 <field>
                     <name>container_id</name>
                     <length>80</length>
                     <type>text</type>
                 </field>
                 <field>
                     <name>sourcetype</name>
                     <type>text</type>
                     <notnull>true</notnull>
                 </field>
                 <field>
                     <name>interval</name>
                     <type>text</type>
                 </field>
                 <field>
                     <name>source</name>
                     <type>text</type>
                 </field>
                 <field>
                     <name>options</name>
                     <type>text</type>
                 </field>
                 <index>
                     <name>id</name>
                     <primary>true</primary>
                     <field>
                         <name>id</name>
                     </field>
                 </index>
                 <field>
                     <name>created_by</name>
                     <type>text</type>
                     <length>40</length>
                 </field>
                 <field>
                     <name>creation_time</name>
                     <type>datetime</type>
                 </field>
                 <field>
                     <name>last_modified_by</name>
                     <type>text</type>
                     <length>40</length>
                 </field>
                 <field>
                     <name>last_modified_time</name>
                     <type>datetime</type>
                 </field>
                 <field>
                     <name>is_deleted</name>
                     <type>boolean</type>
                     <notnull>true</notnull>
                     <default>false</default>
                 </field>
                 <field>
                     <name>deleted_by</name>
                     <type>text</type>
                     <length>40</length>
                 </field>
                 <field>
                     <name>deleted_time</name>
                     <type>datetime</type>
                 </field>
                 <field>
                     <name>seq</name>
                     <type>integer</type>
                     <notnull>true</notnull>
                     <default>0</default>
                 </field>
                 <index>
                     <name>import::application_id--applications::id</name>
                     <field>
                         <name>application_id</name>
                     </field>
                     <foreign>true</foreign>
                     <reference>
                         <table>applications</table>
                         <field>id</field>
                     </reference>
                 </index>
                 <index>
                     <name>import::user_id--accounts::id</name>
                     <field>
                         <name>user_id</name>
                     </field>
                     <foreign>true</foreign>
                     <reference>
                         <table>accounts</table>
                         <field>id</field>
                     </reference>
                 </index>
             </declaration>
         </table>';
     $table = Setup_Backend_Schema_Table_Factory::factory('String', $tableDefinition);
     $this->_backend->createTable($table);
     $scheduler = Tinebase_Core::getScheduler();
     Tinebase_Scheduler_Task::addImportTask($scheduler);
     $this->setApplicationVersion('Tinebase', '8.6');
 }
开发者ID:hernot,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:101,代码来源:Release8.php

示例12: update_5

 /**
  * update to 7.6
  * 
  * @see 0008318: add clear accesslog to scheduler
  */
 public function update_5()
 {
     $scheduler = Tinebase_Core::getScheduler();
     Tinebase_Scheduler_Task::addAccessLogCleanupTask($scheduler);
     $this->setApplicationVersion('Tinebase', '7.6');
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:11,代码来源:Release7.php

示例13: testCreateEventWithAlarm

 /**
  * test create event with alarm
  *
  * @todo add testUpdateEventWithAlarm
  */
 public function testCreateEventWithAlarm()
 {
     $eventData = $this->_getEventWithAlarm(TRUE)->toArray();
     $persistentEventData = $this->_uit->saveEvent($eventData);
     $loadedEventData = $this->_uit->getEvent($persistentEventData['id']);
     //print_r($loadedEventData);
     // check if alarms are created / returned
     $this->assertGreaterThan(0, count($loadedEventData['alarms']));
     $this->assertEquals('Calendar_Model_Event', $loadedEventData['alarms'][0]['model']);
     $this->assertEquals(Tinebase_Model_Alarm::STATUS_PENDING, $loadedEventData['alarms'][0]['sent_status']);
     $this->assertTrue(isset($loadedEventData['alarms'][0]['minutes_before']) || array_key_exists('minutes_before', $loadedEventData['alarms'][0]), 'minutes_before is missing');
     $scheduler = Tinebase_Core::getScheduler();
     $scheduler->addTask('Tinebase_Alarm', $this->createTask());
     $scheduler->run();
     // check alarm status
     $loadedEventData = $this->_uit->getEvent($persistentEventData['id']);
     $this->assertEquals(Tinebase_Model_Alarm::STATUS_SUCCESS, $loadedEventData['alarms'][0]['sent_status']);
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:23,代码来源:JsonTests.php

示例14: update_7

 /**
  * update to 4.8
  * - add temp file cleanup task to scheduler
  */
 public function update_7()
 {
     $scheduler = Tinebase_Core::getScheduler();
     Tinebase_Scheduler_Task::addTempFileCleanupTask($scheduler);
     $this->setApplicationVersion('Tinebase', '4.8');
 }
开发者ID:,项目名称:,代码行数:10,代码来源:

示例15: testCleanupCacheTriggeredByScheduler

 /**
  * testCleanupCacheTriggeredByScheduler (this is only for code coverage)
  * 
  * @see Tinebase_ControllerTest::testCleanupCache() for the real cache cleanup test
  */
 public function testCleanupCacheTriggeredByScheduler()
 {
     $scheduler = Tinebase_Core::getScheduler();
     Tinebase_Scheduler_Task::addCacheCleanupTask($scheduler);
     $scheduler->run();
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:11,代码来源:SchedulerTest.php


注:本文中的Tinebase_Core::getScheduler方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。