X7ROOT File Manager
Current Path:
/home/gfecatvj/sites/vendor/illuminate/console/Scheduling
home
/
gfecatvj
/
sites
/
vendor
/
illuminate
/
console
/
Scheduling
/
📁
..
📄
CacheAware.php
(238 B)
📄
CacheEventMutex.php
(1.75 KB)
📄
CacheSchedulingMutex.php
(1.68 KB)
📄
CallbackEvent.php
(3.9 KB)
📄
CommandBuilder.php
(2.18 KB)
📄
Event.php
(21.16 KB)
📄
EventMutex.php
(685 B)
📄
ManagesFrequencies.php
(10.92 KB)
📄
Schedule.php
(8.46 KB)
📄
ScheduleFinishCommand.php
(1004 B)
📄
ScheduleRunCommand.php
(3.87 KB)
📄
SchedulingMutex.php
(658 B)
Editing: CommandBuilder.php
<?php namespace Illuminate\Console\Scheduling; use Illuminate\Console\Application; use Illuminate\Support\ProcessUtils; class CommandBuilder { /** * Build the command for the given event. * * @param \Illuminate\Console\Scheduling\Event $event * @return string */ public function buildCommand(Event $event) { if ($event->runInBackground) { return $this->buildBackgroundCommand($event); } return $this->buildForegroundCommand($event); } /** * Build the command for running the event in the foreground. * * @param \Illuminate\Console\Scheduling\Event $event * @return string */ protected function buildForegroundCommand(Event $event) { $output = ProcessUtils::escapeArgument($event->output); return $this->ensureCorrectUser( $event, $event->command.($event->shouldAppendOutput ? ' >> ' : ' > ').$output.' 2>&1' ); } /** * Build the command for running the event in the background. * * @param \Illuminate\Console\Scheduling\Event $event * @return string */ protected function buildBackgroundCommand(Event $event) { $output = ProcessUtils::escapeArgument($event->output); $redirect = $event->shouldAppendOutput ? ' >> ' : ' > '; $finished = Application::formatCommandString('schedule:finish').' "'.$event->mutexName().'"'; if (windows_os()) { return 'start /b cmd /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 &' ); } /** * Finalize the event's command syntax with the correct user. * * @param \Illuminate\Console\Scheduling\Event $event * @param string $command * @return string */ protected function ensureCorrectUser(Event $event, $command) { return $event->user && ! windows_os() ? 'sudo -u '.$event->user.' -- sh -c \''.$command.'\'' : $command; } }
Upload File
Create Folder