Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/GO/Scheduler.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ public function php($script, $bin = null, $args = [], $id = null)
$bin = $bin !== null && is_string($bin) && file_exists($bin) ?
$bin : (PHP_BINARY === '' ? '/usr/bin/php' : PHP_BINARY);

if (PHP_OS_FAMILY == 'Windows' && stripos($bin, ' ') !== false) {
$bin = '"{$bin}"';
}

$job = new Job($bin . ' ' . $script, $args, $id);

if (! file_exists($script)) {
Expand Down