本文整理汇总了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']);
}
}
}
示例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}");
}
}
示例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}");
}
}
示例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"]);
}
}
示例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
}
}
示例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
}
}