本文整理汇总了PHP中cron::byClassAndFunction方法的典型用法代码示例。如果您正苦于以下问题:PHP cron::byClassAndFunction方法的具体用法?PHP cron::byClassAndFunction怎么用?PHP cron::byClassAndFunction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cron
的用法示例。
在下文中一共展示了cron::byClassAndFunction方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: remove
function remove()
{
$cron = cron::byClassAndFunction('zwave', 'pull');
if (is_object($cron)) {
$cron->remove();
}
}
示例2: health
public static function health()
{
$return = array();
$demon_state = self::deamonRunning();
$return[] = array('test' => __('Démon local', __FILE__), 'result' => $demon_state ? __('OK', __FILE__) : __('NOK', __FILE__), 'advice' => $demon_state ? '' : __('Peut être normal si vous êtes en déporté', __FILE__), 'state' => $demon_state);
$version = openzwave::getVersion('openzwave');
$return[] = array('test' => __('Version d\'openzwave', __FILE__), 'result' => $version, 'advice' => $demon_state ? '' : __('Mettez à jour les dépendances', __FILE__), 'state' => version_compare(config::byKey('openzwave_version', 'openzwave'), $version, '<='));
$compilation = openzwave::compilationOk();
$return[] = array('test' => __('Compilation', __FILE__), 'result' => $compilation ? __('OK', __FILE__) : __('NOK', __FILE__), 'advice' => $compilation ? '' : __('Mettez à jour les dépendances', __FILE__), 'state' => $compilation);
if (config::byKey('jeeNetwork::mode') == 'master') {
$cron = cron::byClassAndFunction('openzwave', 'pull');
$running = false;
if (is_object($cron)) {
$running = $cron->running();
}
$return[] = array('test' => __('Tâche Z-Wave', __FILE__), 'result' => $running ? __('OK', __FILE__) : __('NOK', __FILE__), 'advice' => $running ? '' : __('Allez sur la page du moteur des tâches et vérifiez lancer la tache openzwave::pull', __FILE__), 'state' => $running);
foreach (jeeNetwork::byPlugin('openzwave') as $jeeNetwork) {
try {
$demon_state = $jeeNetwork->sendRawRequest('deamonRunning', array('plugin' => 'openzwave'));
} catch (Exception $e) {
$demon_state = false;
}
$return[] = array('test' => __('Démon sur ', __FILE__) . $jeeNetwork->getName(), 'result' => $demon_state ? __('OK', __FILE__) : __('NOK', __FILE__), 'advice' => '', 'state' => $demon_state);
$version = $jeeNetwork->sendRawRequest('getVersion', array('plugin' => 'openzwave', 'module' => 'openzwave'));
$return[] = array('test' => __('Version d\'openzwave sur ', __FILE__) . $jeeNetwork->getName(), 'result' => $version, 'advice' => $demon_state ? '' : __('Mettez à jour les dépendances', __FILE__), 'state' => version_compare(config::byKey('openzwave_version', 'openzwave'), $version, '<='));
$compilation = $jeeNetwork->sendRawRequest('compilationOk', array('plugin' => 'openzwave'));
$return[] = array('test' => __('Compilation sur', __FILE__) . $jeeNetwork->getName(), 'result' => $compilation ? __('OK', __FILE__) : __('NOK', __FILE__), 'advice' => $compilation ? '' : __('Mettez à jour les dépendances', __FILE__), 'state' => $compilation);
}
}
return $return;
}
示例3: xpl_remove
function xpl_remove()
{
$cron = cron::byClassAndFunction('xpl', 'deamon');
if (is_object($cron)) {
$cron->remove();
}
}
示例4: domogeek_remove
function domogeek_remove()
{
$cron = cron::byClassAndFunction('domogeek', 'pull');
if (is_object($cron)) {
$cron->remove();
}
}
示例5: ewattch_remove
function ewattch_remove()
{
$cron = cron::byClassAndFunction('ewattch', 'pull');
if (is_object($cron)) {
$cron->remove();
}
}
示例6: tesla_remove
function tesla_remove()
{
$cron = cron::byClassAndFunction('tesla', 'pull');
if (is_object($cron)) {
$cron->remove();
}
}
示例7: sonos3_remove
function sonos3_remove()
{
$cron = cron::byClassAndFunction('sonos3', 'pull');
if (is_object($cron)) {
$cron->remove();
}
}
示例8: openzwave_remove
function openzwave_remove()
{
if (openzwave::deamonRunning()) {
openzwave::stopDeamon();
}
$cron = cron::byClassAndFunction('openzwave', 'pull');
if (is_object($cron)) {
$cron->remove();
}
}
示例9: mySensors_remove
function mySensors_remove()
{
$cron = cron::byClassAndFunction('mySensors', 'pull');
if (is_object($cron)) {
$cron->remove();
}
if (method_exists('mySensors', 'stopDeamon')) {
mySensors::stopDeamon();
}
}
示例10: health
public static function health()
{
$return = array();
$cron = cron::byClassAndFunction('ewattch', 'pull');
$running = false;
if (is_object($cron)) {
$running = $cron->running();
}
$return[] = array('test' => __('Tâche de synchronisation', __FILE__), 'result' => $running ? __('OK', __FILE__) : __('NOK', __FILE__), 'advice' => $running ? '' : __('Allez sur la page du moteur des tâches et vérifiez lancer la tache ewattch::pull', __FILE__), 'state' => $running);
return $return;
}
示例11: gCalendar_remove
function gCalendar_remove()
{
$cron = cron::byClassAndFunction('gCalendar', 'pull');
if (is_object($cron)) {
$cron->remove();
}
// supprimer les fichiers cache et le répertoire //
array_map('unlink', glob(GCALENDAR_CACHE_PATH . "gCalendar_*.tmp.xml"));
if (rmdir(GCALENDAR_CACHE_PATH) === true) {
log::add('gCalendar', 'info', 'gCalendar_remove(): Le répertoire (' . GCALENDAR_CACHE_PATH . ') et ses fichiers ont correctement été supprimés.');
} else {
log::add('gCalendar', 'error', 'gCalendar_remove(): Impossible de supprimer le répertoire: ' . GCALENDAR_CACHE_PATH);
}
}
示例12: arduidom_remove
function arduidom_remove()
{
$cron = cron::byClassAndFunction('arduidom', 'checkdaemon');
if (is_object($cron)) {
$cron->remove();
}
arduidom::stopdaemon(1);
arduidom::stopdaemon(2);
arduidom::stopdaemon(3);
arduidom::stopdaemon(4);
arduidom::stopdaemon(5);
arduidom::stopdaemon(6);
arduidom::stopdaemon(7);
arduidom::stopdaemon(8);
}
示例13: ecodevice_remove
function ecodevice_remove()
{
$cron = cron::byClassAndFunction('ecodevice', 'pull');
if (is_object($cron)) {
$cron->remove();
}
$cron = cron::byClassAndFunction('ecodevice', 'cron');
if (is_object($cron)) {
$cron->remove();
}
foreach (eqLogic::byType('ecodevice_compteur') as $SubeqLogic) {
$SubeqLogic->remove();
}
foreach (eqLogic::byType('ecodevice_teleinfo') as $SubeqLogic) {
$SubeqLogic->remove();
}
foreach (eqLogic::byType('ecodevice') as $eqLogic) {
$eqLogic->remove();
}
}
示例14: openzwave_update
function openzwave_update()
{
if (!file_exists(dirname(__FILE__) . '/../data')) {
mkdir(dirname(__FILE__) . '/../data');
if (file_exists('/opt/python-openzwave/xml_backups')) {
shell_exec('cp -R /opt/python-openzwave/xml_backups ' . dirname(__FILE__) . '/../data');
shell_exec('cp -R /opt/python-openzwave/zwcfg_*.xml ' . dirname(__FILE__) . '/../data');
shell_exec('rm -rf /opt/python-openzwave/xml_backups');
shell_exec('rm -rf /opt/python-openzwave/zwcfg_*.xml');
}
}
$cron = cron::byClassAndFunction('openzwave', 'pull');
if (is_object($cron)) {
$cron->remove();
}
if (count(eqLogic::byType('zwave')) > 0) {
log::add('openzwave', 'error', 'Attention vous etes sur la nouvelle version d\'openzwave, des actions de votre part sont necessaire merci d\'aller voir https://jeedom.fr/blog/?p=1576');
}
openzwave::syncconfOpenzwave();
}
示例15: cron
$cron->setClass('plugin');
$cron->setFunction('cron');
$cron->setSchedule('* * * * * *');
$cron->setTimeout(60);
$cron->save();
$cron = cron::byClassAndFunction('plugin', 'cron15');
if (!is_object($cron)) {
echo "Création de plugin::cron15\n";
$cron = new cron();
}
$cron->setClass('plugin');
$cron->setFunction('cron15');
$cron->setSchedule('*/15 * * * * *');
$cron->setTimeout(60);
$cron->save();
$cron = cron::byClassAndFunction('plugin', 'cron30');
if (!is_object($cron)) {
echo "Création de plugin::cron30\n";
$cron = new cron();
}
$cron->setClass('plugin');
$cron->setFunction('cron30');
$cron->setSchedule('*/30 * * * * *');
$cron->setTimeout(60);
$cron->save();
$dynamic_apache_path = dirname(__FILE__) . '/../core/config/apache_jeedom_dynamic_rules';
if (!file_exists($dynamic_apache_path)) {
touch($dynamic_apache_path);
}
if (jeedom::isCapable('sudo')) {
if (!file_exists('/var/log/auth.log')) {