diff --git a/src/ninegate-1.0/src/Cadoles/CronBundle/Controller/CronController.php b/src/ninegate-1.0/src/Cadoles/CronBundle/Controller/CronController.php index 55f80111..98e69db3 100644 --- a/src/ninegate-1.0/src/Cadoles/CronBundle/Controller/CronController.php +++ b/src/ninegate-1.0/src/Cadoles/CronBundle/Controller/CronController.php @@ -172,6 +172,23 @@ class CronController extends Controller ]); } + public function cronexecAction() { + return $this->render('CadolesCronBundle:Cron:exec.html.twig', [ + 'useheader' => true, + 'usemenu' => false, + 'usesidebar' => true, + ]); + } + + public function cronexecreadAction() { + $kernel = $this->get('kernel'); + $path = $this->get('kernel')->getRootDir() . '/../var/logs/exec.log'; + $content = file_get_contents($path); + + $output["data"]=$content; + return new Response(json_encode($content), 200); + } + public function logAction(Request $request, $id) { $kernel = $this->get('kernel'); diff --git a/src/ninegate-1.0/src/Cadoles/CronBundle/Resources/config/routing.yml b/src/ninegate-1.0/src/Cadoles/CronBundle/Resources/config/routing.yml index 7b87c43f..923f9672 100644 --- a/src/ninegate-1.0/src/Cadoles/CronBundle/Resources/config/routing.yml +++ b/src/ninegate-1.0/src/Cadoles/CronBundle/Resources/config/routing.yml @@ -14,6 +14,14 @@ cadoles_cron_config_exec: path: /config/cron/exec/{id} defaults: { _controller: CadolesCronBundle:Cron:exec } +cadoles_cron_config_cronexec: + path: /config/cron/cronexec + defaults: { _controller: CadolesCronBundle:Cron:cronexec } + +cadoles_cron_config_cronexecread: + path: /config/cron/cronexecread + defaults: { _controller: CadolesCronBundle:Cron:cronexecread } + cadoles_cron_config_log: path: /config/cron/log/{id} controller: CadolesCronBundle:Cron:log