本文整理汇总了PHP中Scheduler::initTimer方法的典型用法代码示例。如果您正苦于以下问题:PHP Scheduler::initTimer方法的具体用法?PHP Scheduler::initTimer怎么用?PHP Scheduler::initTimer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Scheduler
的用法示例。
在下文中一共展示了Scheduler::initTimer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
if (file_exists(dirname(__FILE__) . '/utils/mapping.class.php')) {
include_once "utils/mapping.class.php";
}
if (file_exists(dirname(__FILE__) . '/utils/xml.class.php')) {
include_once "utils/xml.class.php";
}
if (file_exists(dirname(__FILE__) . '/utils/scheduler.class.php')) {
include_once "utils/scheduler.class.php";
}
if (file_exists(dirname(__FILE__) . '/utils/forceRequest.class.php')) {
include_once "utils/forceRequest.class.php";
}
/* Init log default type */
Log::setDefaultType($CONF_default_log);
/* Init of scheduler */
Scheduler::initTimer($CONF_WsGetReqList, $CONF_WsPostReqList, $CONF_CachetimeLbl, $CONF_LastrequestLbl);
/* Init of forceRequest (used to test only one request) */
ForceRequest::initForceRequest(Scheduler::getWsNameGetList(), Scheduler::getWsNamePostList());
if (ForceRequest::isForcedRequest() && isset($_GET['log'])) {
Log::setDefaultType($_GET['log']);
}
/*
* Execute POST requests
*/
Log::write("###### DO POST REQUESTS ######", "info");
$listPOST = '';
for ($i = 0; $i < sizeof($CONF_WsPostReqList); $i++) {
$listPOST .= $i == 0 ? $CONF_WsPostReqList[$i] : ' - ' . $CONF_WsPostReqList[$i];
}
Log::write("Webservices to call : " . $listPOST, "info");
include "postSynchCtrl.php";