} if (init('action') == 'remove') { $cron = cron::byId(init('id')); if (!is_object($cron)) { throw new Exception(__('Cron id inconnu', __FILE__)); } $cron->remove(); ajax::success(); } if (init('action') == 'all') { $results = array(); $results['crons'] = utils::o2a(cron::all(true)); $results['nbCronRun'] = cron::nbCronRun(); $results['nbProcess'] = cron::nbProcess(); $results['nbMasterCronRun'] = cron::jeeCronRun() ? 1 : 0; $results['loadAvg'] = cron::loadAvg(); ajax::success($results); } if (init('action') == 'start') { $cron = cron::byId(init('id')); if (!is_object($cron)) { throw new Exception(__('Cron id inconnu', __FILE__)); } $cron->run(); sleep(1); ajax::success(); } if (init('action') == 'stop') { $cron = cron::byId(init('id')); if (!is_object($cron)) { throw new Exception(__('Cron id inconnu', __FILE__));