This commit is contained in:
afornerot 2020-04-23 08:47:16 +02:00
parent 9b5aae23b2
commit 7e37599fb6
2 changed files with 25 additions and 0 deletions

View File

@ -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) public function logAction(Request $request, $id)
{ {
$kernel = $this->get('kernel'); $kernel = $this->get('kernel');

View File

@ -14,6 +14,14 @@ cadoles_cron_config_exec:
path: /config/cron/exec/{id} path: /config/cron/exec/{id}
defaults: { _controller: CadolesCronBundle:Cron:exec } 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: cadoles_cron_config_log:
path: /config/cron/log/{id} path: /config/cron/log/{id}
controller: CadolesCronBundle:Cron:log controller: CadolesCronBundle:Cron:log