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


PHP Vtiger_Cron::nextSequence方法代码示例

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


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

示例1: process

 public function process(Vtiger_Request $request)
 {
     $adb = PearDatabase::getInstance();
     //$params = $request->getAll();
     $value = $request->get('value');
     $cron = array('name' => 'SWVTTool GoogleCalSync', 'handler_file' => 'modules/SwVtTools/cron/gcal_sync.service.php', 'frequency' => '600', 'module' => 'SwVtTools', 'desc' => 'Check every 10 minutes if Calendar needs to be synced');
     if ($value == 'false') {
         Vtiger_Cron::deregister($cron['name']);
     } else {
         $sql = 'SELECT * FROM vtiger_cron_task WHERE name = ?';
         $result = $adb->pquery($sql, array($cron['name']));
         if ($adb->num_rows($result) > 0) {
             $sql = 'UPDATE vtiger_cron_task SET status = 1, handler_file = "' . $cron['handler_file'] . '" WHERE id = ' . $adb->query_result($result, 0, 'id');
             $adb->query($sql);
         } else {
             Vtiger_Cron::register($cron['name'], $cron['handler_file'], $cron['frequency'], $cron['module'], 1, Vtiger_Cron::nextSequence(), $cron['desc']);
         }
     }
 }
开发者ID:Neodracir,项目名称:VtigerCRM-Tools,代码行数:19,代码来源:SetGCalSync.php

示例2: import_CronTasks

 /**
  * Import cron jobs of the module.
  * @access private
  */
 function import_CronTasks($modulenode)
 {
     if (empty($modulenode->crons) || empty($modulenode->crons->cron)) {
         return;
     }
     foreach ($modulenode->crons->cron as $cronTask) {
         if (empty($cronTask->status)) {
             $cronTask->status = Vtiger_Cron::$STATUS_DISABLED;
         } else {
             $cronTask->status = Vtiger_Cron::$STATUS_ENABLED;
         }
         if (empty($cronTask->sequence)) {
             $cronTask->sequence = Vtiger_Cron::nextSequence();
         }
         Vtiger_Cron::register("{$cronTask->name}", "{$cronTask->handler}", "{$cronTask->frequency}", "{$modulenode->name}", "{$cronTask->status}", "{$cronTask->sequence}", "{$cronTask->description}");
     }
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:21,代码来源:PackageImport.php

示例3: update_CronTasks

 function update_CronTasks($modulenode)
 {
     if (empty($modulenode->crons) || empty($modulenode->crons->cron)) {
         return;
     }
     $cronTasks = Vtiger_Cron::listAllInstancesByModule($modulenode->name);
     foreach ($modulenode->crons->cron as $importCronTask) {
         foreach ($cronTasks as $cronTask) {
             if ($cronTask->getName() == $importCronTask->name && $importCronTask->handler == $cronTask->getHandlerFile()) {
                 Vtiger_Cron::deregister($importCronTask->name);
             }
         }
         if (empty($importCronTask->status)) {
             $cronTask->status = Vtiger_Cron::$STATUS_DISABLED;
         } else {
             $cronTask->status = Vtiger_Cron::$STATUS_ENABLED;
         }
         if (empty($importCronTask->sequence)) {
             $importCronTask->sequence = Vtiger_Cron::nextSequence();
         }
         Vtiger_Cron::register("{$importCronTask->name}", "{$importCronTask->handler}", "{$importCronTask->frequency}", "{$modulenode->name}", "{$importCronTask->status}", "{$importCronTask->sequence}", "{$importCronTask->description}");
     }
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:23,代码来源:PackageUpdate.php

示例4: checkCron

 public function checkCron()
 {
     ${"GLOBALS"}["zxgfwdm"] = "adb";
     ${"GLOBALS"}["lxljfuqjkxr"] = "cron";
     ${${"GLOBALS"}["zxgfwdm"]} = \PearDatabase::getInstance();
     ${${"GLOBALS"}["lxljfuqjkxr"]} = array("name" => "Workflow2 Queue", "handler_file" => "cron/modules/Workflow2/queue.service", "frequency" => "600", "module" => "Workflow2", "desc" => "Check every 10 minutes if Workflows should be continued");
     ${${"GLOBALS"}["wpvlkaycsb"]} = "SELECT * FROM vtiger_cron_task WHERE name = ?";
     ${${"GLOBALS"}["bcibcujqqmt"]} = $adb->pquery(${${"GLOBALS"}["wpvlkaycsb"]}, array(${${"GLOBALS"}["mfbcocs"]}["name"]));
     if ($adb->num_rows(${${"GLOBALS"}["bcibcujqqmt"]}) > 0) {
         $ittvvhdfhyb = "cron";
         $rbhwvnqkbcd = "result";
         ${"GLOBALS"}["lwujovtyaf"] = "sql";
         ${${"GLOBALS"}["lwujovtyaf"]} = "UPDATE vtiger_cron_task SET status = 1, handler_file = \"" . ${$ittvvhdfhyb}["handler_file"] . "\" WHERE id = " . $adb->query_result(${$rbhwvnqkbcd}, 0, "id");
         $adb->query(${${"GLOBALS"}["wpvlkaycsb"]});
     } else {
         ${"GLOBALS"}["osasktn"] = "cron";
         $shilvibxs = "cron";
         Vtiger_Cron::register(${${"GLOBALS"}["osasktn"]}["name"], ${${"GLOBALS"}["mfbcocs"]}["handler_file"], ${$shilvibxs}["frequency"], ${${"GLOBALS"}["mfbcocs"]}["module"], 1, Vtiger_Cron::nextSequence(), ${${"GLOBALS"}["mfbcocs"]}["desc"]);
     }
 }
开发者ID:cin-system,项目名称:vtigercrm-cin,代码行数:20,代码来源:Workflow2.php

示例5: update_CronTasks

 function update_CronTasks($modulenode)
 {
     if (empty($modulenode->crons) || empty($modulenode->crons->cron)) {
         return;
     }
     $cronTasks = Vtiger_Cron::listAllInstancesByModule($modulenode->name);
     foreach ($modulenode->crons->cron as $importCronTask) {
         foreach ($cronTasks as $cronTask) {
             if ($cronTask->getName() == $importCronTask->name && $importCronTask->handler == $cronTask->getHandlerFile()) {
                 Vtiger_Cron::deregister($importCronTask->name);
             }
         }
         if (empty($importCronTask->status)) {
             $cronTask->status = Vtiger_Cron::$STATUS_DISABLED;
         } else {
             $cronTask->status = Vtiger_Cron::$STATUS_ENABLED;
         }
         if (empty($importCronTask->sequence)) {
             $importCronTask->sequence = Vtiger_Cron::nextSequence();
         }
         // SalesPlatform.ru begin added support laststart/lastend
         Vtiger_Cron::register("{$importCronTask->name}", "{$importCronTask->handler}", "{$importCronTask->frequency}", "{$modulenode->name}", "{$importCronTask->status}", "{$importCronTask->sequence}", "{$cronTask->description}", "{$importCronTask->laststart}", "{$importCronTask->lastend}");
         //Vtiger_Cron::register("$importCronTask->name","$importCronTask->handler", "$importCronTask->frequency", "$modulenode->name","$importCronTask->status","$importCronTask->sequence","$cronTask->description");
         // SalesPlatform.ru end
     }
 }
开发者ID:DeliveryPLANET,项目名称:vTiger,代码行数:26,代码来源:PackageUpdate.php

示例6: import_CronTasks

 /**
  * Import cron jobs of the module.
  * @access private
  */
 function import_CronTasks($modulenode)
 {
     if (empty($modulenode->crons) || empty($modulenode->crons->cron)) {
         return;
     }
     foreach ($modulenode->crons->cron as $cronTask) {
         if (empty($cronTask->status)) {
             $cronTask->status = Vtiger_Cron::$STATUS_DISABLED;
         } else {
             $cronTask->status = Vtiger_Cron::$STATUS_ENABLED;
         }
         if (empty($cronTask->sequence)) {
             $cronTask->sequence = Vtiger_Cron::nextSequence();
         }
         // SalesPlatform.ru begin added support laststart/lastend
         Vtiger_Cron::register("{$cronTask->name}", "{$cronTask->handler}", "{$cronTask->frequency}", "{$modulenode->name}", "{$cronTask->status}", "{$cronTask->sequence}", "{$cronTask->description}", "{$cronTask->laststart}", "{$cronTask->lastend}");
         //Vtiger_Cron::register("$cronTask->name","$cronTask->handler", "$cronTask->frequency", "$modulenode->name","$cronTask->status","$cronTask->sequence","$cronTask->description");
         // SalesPlatform.ru end
     }
 }
开发者ID:gitter-badger,项目名称:openshift-salesplatform,代码行数:24,代码来源:PackageImport.php


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