diff options
Diffstat (limited to 'app/Controller/CronjobController.php')
-rw-r--r-- | app/Controller/CronjobController.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/app/Controller/CronjobController.php b/app/Controller/CronjobController.php new file mode 100644 index 00000000..082fadfa --- /dev/null +++ b/app/Controller/CronjobController.php @@ -0,0 +1,32 @@ +<?php + +namespace Kanboard\Controller; + +use Kanboard\Controller\BaseController; +use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Output\NullOutput; + +/** + * Class CronjobController + * + * Runs cron jobs via URL + * + * @package Kanboard\Controller + */ +class CronjobController extends BaseController +{ + public function run() + { + $this->checkWebhookToken(); + + $input = new ArrayInput(array( + 'command' => 'cronjob', + )); + $output = new NullOutput(); + + $this->cli->setAutoExit(false); + $this->cli->run($input, $output); + + $this->response->html('Cronjob executed'); + } +} |