Closed

Description
Laravel Version
10.4.1
PHP Version
8.1.4
Database Driver & Version
Mysql 8
Description
Hi,
if (windows_os()) {
return 'start /b cmd /v:on /c "('.$event->command.' & '.$finished.' ^!ERRORLEVEL^!)'.$redirect.$output.' 2>&1"';
}
return $this->ensureCorrectUser($event,
'('.$event->command.$redirect.$output.' 2>&1 ; '.$finished.' "$?") > '
.ProcessUtils::escapeArgument($event->getDefaultOutput()).' 2>&1 &'
);
should be
if (windows_os()) {
return 'start /b cmd /v:on /c "('.$event->command.' & '.$finished.' ^!ERRORLEVEL^!)'.$redirect.$output.' 2>&1"';
}
return $this->ensureCorrectUser($event,
'('.$event->command.$redirect.$output.' 2>&1 ; '.$finished.' "$?") ' . $redirect . $output . ' 2>&1 &'
);
Steps To Reproduce
Run a background scheduled command defined like this:
->runInBackground()->sendOutputTo('/dev/stdout')
and check the logs for
Running scheduled command: ('/usr/local/bin/php' 'artisan' {command signature} > '/dev/stdout' 2>&1 ; '/usr/local/bin/php' 'artisan' schedule:finish "framework/schedule-{random}" "$?") > '/dev/null' 2>&1 &
If the log channel is set to stdout, the command will log nothing.
Metadata
Metadata
Assignees
Labels
No labels