CronRunnerController.php (470B)
1 <?php 2 3 namespace PartKeepr\CronLoggerBundle\Controller; 4 5 use FOS\RestBundle\Controller\FOSRestController; 6 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; 7 use Symfony\Component\HttpFoundation\Response; 8 9 class CronRunnerController extends FOSRestController 10 { 11 /** 12 * @Route("/api/cron/run") 13 */ 14 public function runCronsAction() 15 { 16 $this->get('partkeepr.cronlogger_service')->runCrons(); 17 18 return new Response('', 200); 19 } 20 }