Skip to content

Commit

Permalink
Merge pull request #13 from gietos/cli-script-name
Browse files Browse the repository at this point in the history
Extract cli script name into variable
  • Loading branch information
omnilight committed Jul 9, 2016
2 parents 5aa7c69 + 2ae6e3b commit e71404b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Schedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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);
}

/**
Expand Down Expand Up @@ -70,4 +75,4 @@ public function dueEvents(Application $app)
return $event->isDue($app);
});
}
}
}

0 comments on commit e71404b

Please sign in to comment.