本文整理汇总了PHP中Control::_crontab方法的典型用法代码示例。如果您正苦于以下问题:PHP Control::_crontab方法的具体用法?PHP Control::_crontab怎么用?PHP Control::_crontab使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Control
的用法示例。
在下文中一共展示了Control::_crontab方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Control
** This modification allow the user to modify SEC data
**/
$cmd = new Control(true);
/*
$cmd->parametro->remove('STDOUT');
$cmd->parametro->set('STDOUT', true);
*
*/
$cmd->parametro->set('LOGS_FILE', 'logs_fdt');
$cmd->logs->info("[FIXFDT] ===============================================");
$cmd->logs->info("[FIXFDT] Starting Statistic Server");
$cmd->logs->info("[FIXFDT] Copyright Baking Software 2011");
$cmd->logs->info("[FIXFDT] Version 1.1.darkside");
$cmd->logs->info("[FIXFDT] ===============================================");
$active = $cmd->_crontab("fdt_fix_crontab", "start");
if ($active) {
$cmd->logs->info("[FIXFDT] Starting OK");
} else {
$cmd->logs->info("[FIXFDT] Starting NOK");
exit;
}
$start = microtime(true);
if (!isset($argv[1])) {
$dmenos = 0;
} else {
$dmenos = $argv[1];
}
$xdt = strftime("%A %Y-%m-%d", strtotime("{$dmenos} days"));
$daysNow = strftime("%u", strtotime("{$dmenos} days"));
$datestart = strftime("%Y-%m-%d 01:00:00", strtotime("{$dmenos} days"));
示例2: CreateVel
$options = getopt("d::Q:");
/*
$cmd->parametro->remove('STDOUT');
$cmd->parametro->set('STDOUT', true);
*/
if (isset($options['d'])) {
$cmd->parametro->remove('STDOUT');
$cmd->parametro->set('STDOUT', true);
echo "MODO DEBUG ON\n";
}
$cmd->logs->info("[Neutralidad-2] ===============================================", false, 'logs_neutralidad');
$cmd->logs->info("[Neutralidad-2] Starting Neutralidad-1 Subtel", false, 'logs_neutralidad');
$cmd->logs->info("[Neutralidad-2] Copyright Baking Software 2012", false, 'logs_neutralidad');
$cmd->logs->info("[Neutralidad-2] Version 2.1", false, 'logs_neutralidad');
$cmd->logs->info("[Neutralidad-2] ===============================================", false, 'logs_neutralidad');
$active = $cmd->_crontab("neutralidad_subtel", "start");
if ($active) {
$cmd->logs->info("[Neutralidad-1] Starting OK", false, 'logs_neutralidad');
} else {
$cmd->logs->info("[Neutralidad-1] Starting NOK", false, 'logs_neutralidad');
exit;
}
$d1 = date("U");
$cmd->_crontab("neutralidad_subtel", "finish");
// Grupos de neutralidad:
$get_group = $cmd->conexion->queryFetch("SELECT HG.`groupid` FROM `bm_host_groups` HG WHERE HG.`type`='NEUTRALIDAD'");
$get_group = $cmd->conexion->arrayToIN($get_group, 'groupid');
//Parametros
//Funciones
function CreateVel($vel, $cmd)
{
示例3: getopt
$options = getopt("d::h::Q:", $longopts);
if (isset($options['d'])) {
$cmd->parametro->remove('STDOUT');
$cmd->parametro->set('STDOUT', true);
echo "MODO DEBUG ON\n";
}
if (isset($options['h'])) {
var_dump($options);
exit;
}
$cmd->logs->info("[SPLIT] ===============================================", false, 'logs_neutralidad');
$cmd->logs->info("[SPLIT] Starting selecion of data for NEUTRALIDAD", false, 'logs_neutralidad');
$cmd->logs->info("[SPLIT] Copyright Baking Software 2011", false, 'logs_neutralidad');
$cmd->logs->info("[SPLIT] Version 1.1.darkside", false, 'logs_neutralidad');
$cmd->logs->info("[SPLIT] ===============================================", false, 'logs_neutralidad');
$active = $cmd->_crontab("splitneu_crontab", "start", true);
if ($active) {
$cmd->logs->info("[SPLIT] Starting OK", false, 'logs_neutralidad');
} else {
$cmd->logs->info("[SPLIT] Starting NOK", false, 'logs_neutralidad');
exit;
}
$d1 = date("U");
$quarter = ceil(date("n", strtotime("yesterday")) / 3);
$m = '';
if (isset($options['Q']) && is_numeric($options['Q']) && ($options['Q'] > 0 && $options['Q'] < 5)) {
$quarter = (int) $argv[2];
echo "Ocupando Q" . $quarter . "\n";
$param = TRUE;
//Limpiando Datos
$getHostItem = $cmd->conexion->query("TRUNCATE TABLE `bm_q`;");
示例4: Control
$domain = 'bmonitor.baking.cl';
} else {
$domain = $argv[1];
}
$cmd = new Control(true, $domain);
$cmd->parametro->remove('STDOUT');
$cmd->parametro->remove('DEBUG');
$cmd->parametro->set('STDOUT', true);
$cmd->parametro->set('DEBUG', false);
$cmd->parametro->set('LOGS_FILE', $var->logsFile);
$cmd->logs->info("[QoS] ===============================================");
$cmd->logs->info("[QoS] Starting Statistic Server");
$cmd->logs->info("[QoS] Copyright Baking Software 2013");
$cmd->logs->info("[QoS] Version 2.1");
$cmd->logs->info("[QoS] ===============================================");
$active = $cmd->_crontab($var->crontab, "start");
if ($active) {
$cmd->logs->info("[QoS] Starting OK");
} else {
$cmd->logs->info("[QoS] Starting NOK");
exit;
}
//Set Param
$param = (object) array();
$param->year = date("Y", strtotime("yesterday"));
$param->month = date("n", strtotime("yesterday"));
//$param->month = 6;
if ($param->month < 10) {
$param->month = "0" . $param->month;
}
$param->clock = $param->year . "/" . $param->month;
示例5: Control
<?php
require '../core/startup.inc.php';
/*
** BSW
** Copyright (C) 2012-2012 BSW S.A.
**
** This modification allow the user to modify SEC data
**/
$cmd = new Control(true);
$cmd->parametro->remove('STDOUT');
$cmd->parametro->set('STDOUT', true);
$cmd->parametro->set('LOGS_FILE', 'logs_traps');
$active = $cmd->_crontab("traps_crontab", "start");
if ($active) {
$cmd->logs->info("[traps] Starting OK");
} else {
$cmd->logs->info("[traps] Starting NOK");
exit;
}
$cmd->conexion->InicioTransaccion();
$cmd->conexion->commit();
$cmd->_crontab("traps_crontab", "finish");
示例6: Control
/*
** BSW
** Copyright (C) 2000-2005 BSW S.A.
**
** This modification allow the user to modify SEC data
**/
$cmd = new Control();
$cmd->parametro->remove('STDOUT');
$cmd->parametro->set('STDOUT', true);
$cmd->parametro->set('LOGS_FILE', 'logs_neutralidad');
$cmd->logs->debug("[Neutralidad] ===============================================");
$cmd->logs->debug("[Neutralidad] Starting Statistic Server");
$cmd->logs->debug("[Neutralidad] Copyright Baking Software 2011");
$cmd->logs->debug("[Neutralidad] Version 1.1.darkside");
$cmd->logs->debug("[Neutralidad] ===============================================");
$active = $cmd->_crontab("neutralidad_crontab", "start");
if ($active) {
$cmd->logs->debug("[Neutralidad] Starting OK");
} else {
$cmd->logs->debug("[Neutralidad] Starting NOK");
exit;
}
$d1 = date("U");
$d0 = $d1;
$cmd->conexion->query("update config set ldap_port=-1");
$qy = "";
if (!isset($argv[1])) {
$m = date("n", strtotime("yesterday"));
$y = date("Y", strtotime("yesterday"));
if ($m < 10) {
$m = "0" . $m;
示例7: Control
** This modification allow the user to modify SEC data
**/
$cmd = new Control(true);
/*
$cmd->parametro->remove('STDOUT');
$cmd->parametro->set('STDOUT', true);
*
*/
$cmd->parametro->set('LOGS_FILE', 'logs_export');
$cmd->logs->info("[Export] ===============================================");
$cmd->logs->info("[Export] Starting export");
$cmd->logs->info("[Export] Copyright Baking Software 2013");
$cmd->logs->info("[Export] Version 2.0");
$cmd->logs->info("[Export] ===============================================");
$active = $cmd->_crontab("export_crontab", "start");
if ($active) {
$cmd->logs->info("[Export] Starting OK");
} else {
$cmd->logs->info("[Export] Starting NOK");
exit;
}
if (isset($argv[1]) && isset($argv[2])) {
$date1 = $argv[1];
$date2 = $argv[2];
//Validando fechas
$date1_v = explode('-', $date1);
if (!checkdate($date1_v[1], $date1_v[2], $date1_v[0])) {
echo "\n Fecha invalida \n";
$cmd->_crontab("export_crontab", "finish");
exit;