From 84bc680b634ad15c34f52e3bb24271f3fb8f73ac Mon Sep 17 00:00:00 2001 From: Anastasiia Date: Tue, 23 Apr 2024 18:45:20 +0200 Subject: [PATCH] use array for command arument (fix #133 issue) --- Job/ShellJobWrapper.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Job/ShellJobWrapper.php b/Job/ShellJobWrapper.php index 35088b9..8b2ed0c 100644 --- a/Job/ShellJobWrapper.php +++ b/Job/ShellJobWrapper.php @@ -4,8 +4,16 @@ use Cron\CronBundle\Entity\CronJob; use Cron\Job\ShellJob; +use Symfony\Component\Process\Process; class ShellJobWrapper extends ShellJob { public ?CronJob $raw = null; + + public function setCommand($command, $cwd = null, ?array $env = null, $input = null, $timeout = 60, array $options = []) + { + $commandArray = explode(' ', $command); + + $this->process = new Process($commandArray); + } }