<td style="font-weight : bold;">{{Scénario actif}}</td> <?php if (config::byKey('enableScenario') == 0 && count(scenario::all()) > 0) { echo '<td class="alert alert-danger">{{NOK}}</td>'; echo '<td>{{Erreur scénario : tous les scénarios sont désactivés. Allez dans Général -> Scénarios pour les réactiver}}</td>'; } else { echo '<td class="alert alert-success">{{OK}}</td>'; echo '<td></td>'; } ?> </tr> <tr> <td style="font-weight : bold;">{{Démarré}}</td> <?php if (!jeedom::isStarted()) { echo '<td class="alert alert-danger">{{NOK}}</td>'; echo '<td></td>'; } else { echo '<td class="alert alert-success">{{OK}}</td>'; echo '<td></td>'; } ?> </tr> <tr> <td style="font-weight : bold;">{{Date système}}</td> <?php if (!jeedom::isDateOk()) { echo '<td class="alert alert-danger">' . date('Y-m-d H:i:s') . '</td>'; echo '<td></td>';
$cron->setServer(''); $cron->setDuration(-1); $cron->save(); $logicalId = config::genKey(); if ($e->getCode() != 0) { $logicalId = $cron->getName() . '::' . $e->getCode(); } echo '[Erreur] ' . $cron->getName() . ' : ' . print_r($e, true); log::add('cron', 'error', __('Erreur sur ', __FILE__) . $cron->getName() . ' : ' . print_r($e, true), $logicalId); } } else { if (cron::jeeCronRun()) { die; } $sleepTime = config::byKey('cronSleepTime'); $started = jeedom::isStarted(); set_time_limit(59); cron::setPidFile(); while (true) { if (config::byKey('enableCron', 'core', 1, true) == 0) { die(__('Tous les crons sont actuellement désactivés', __FILE__)); } foreach (cron::all() as $cron) { try { if (!$started && $cron->getClass() != 'jeedom' && $cron->getFunction() != 'cron') { continue; } if (!$cron->refresh()) { continue; } $duration = strtotime('now') - strtotime($cron->getLastRun());