本文整理匯總了PHP中Vtiger_Cron::getInstanceById方法的典型用法代碼示例。如果您正苦於以下問題:PHP Vtiger_Cron::getInstanceById方法的具體用法?PHP Vtiger_Cron::getInstanceById怎麽用?PHP Vtiger_Cron::getInstanceById使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Vtiger_Cron
的用法示例。
在下文中一共展示了Vtiger_Cron::getInstanceById方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
require_once 'include/database/PearDatabase.php';
require_once 'include/utils/VtlibUtils.php';
require_once 'vtlib/Vtiger/Cron.php';
global $adb;
if (isset($_REQUEST['record']) && $_REQUEST['record'] != '') {
$cronTask = Vtiger_Cron::getInstanceById($_REQUEST['record']);
$cronTask->updateStatus($_REQUEST['status']);
if ($_REQUEST['timevalue'] != '') {
if ($_REQUEST['time'] == 'min') {
$time = $_REQUEST['timevalue'] * 60;
} else {
$time = $_REQUEST['timevalue'] * 60 * 60;
}
$cronTask->updateFrequency($time);
}
}
$loc = "Location: index.php?action=CronTasksAjax&file=ListCronJobs&module=CronTasks&directmode=ajax";
header($loc);