當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。