false, 'host' => false, ), array( 'h' => 'help', 'H' => 'host' ) ); if ($unrecognized) { $unrecognized = implode("\n ", $unrecognized); cli_error(get_string('cliunknowoption', 'admin', $unrecognized)); } if ($options['help']) { $help = "Command line chamilo CRON Options: -h, --help Print out this help -H, --host Set the host (physical or virtual) to operate on "; //TODO: localize - to be translated later when everything is finished echo $help; die; } if (!empty($options['host'])) { // arms the vchamilo switching echo('Arming for '.$options['host']."\n"); // mtrace not yet available. define('CLI_VCHAMILO_OVERRIDE', $options['host']); } // replay full config whenever. If vchamilo switch is armed, will switch now config require($_configuration['root_sys'].'main/inc/conf/configuration.php'); // do REALLY force configuration to play again, or the following call will not have config twicked (require_once) echo('Config check : playing for '.$_configuration['root_web']."\n"); error_log('[chamilo][cronjob] Starting cron jobs as process '.getmypid()); echo '
'; echo ('[chamilo][cronjob] Starting cron jobs as process '.getmypid()."\n"); require_once $_configuration['root_sys'].'main/cron/notification.php'; error_log('[chamilo][cronjob] Ending cron jobs of process '.getmypid()); echo('[chamilo][cronjob] Ending cron jobs of process '.getmypid()."\n"); echo '';