From 2ae6e3b76bcbf38a77dd0685d65a3d380972ffb9 Mon Sep 17 00:00:00 2001 From: Sergey Kasatkin Date: Tue, 28 Jun 2016 11:58:52 +0300 Subject: [PATCH] Extract cli script name into variable --- Schedule.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Schedule.php b/Schedule.php index 5e25bbb..c37d7a3 100644 --- a/Schedule.php +++ b/Schedule.php @@ -17,6 +17,11 @@ class Schedule extends Component */ protected $_events = []; + /** + * @var string The name of cli script + */ + public $cliScriptName = 'yii'; + /** * Add a new callback event to the schedule. * @@ -37,7 +42,7 @@ public function call($callback, array $parameters = array()) */ public function command($command) { - return $this->exec(PHP_BINARY.' yii '.$command); + return $this->exec(PHP_BINARY . ' ' . $this->cliScriptName . ' ' . $command); } /** @@ -70,4 +75,4 @@ public function dueEvents(Application $app) return $event->isDue($app); }); } -} \ No newline at end of file +}