Skip to content

Commit

Permalink
use array for command arument (fix #133 issue) (#149)
Browse files Browse the repository at this point in the history
* use named arguments for doctrine backwards compatibility

* use array for command arument (fix #133 issue)
  • Loading branch information
nastia-vinnytska authored Apr 27, 2024
1 parent 398a8ea commit 99d16c1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Job/ShellJobWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 99d16c1

Please sign in to comment.