mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
Fix scheduled tasks being executed using host environment variables
This commit is contained in:
parent
b528a0f4ec
commit
cc870ca302
1 changed files with 1 additions and 1 deletions
|
|
@ -89,7 +89,7 @@ class ScheduledTaskJob implements ShouldQueue
|
|||
|
||||
foreach ($this->containers as $containerName) {
|
||||
if (count($this->containers) == 1 || str_starts_with($containerName, $this->task->container . '-' . $this->resource->uuid)) {
|
||||
$cmd = 'sh -c "' . str_replace('"', '\"', $this->task->command) . '"';
|
||||
$cmd = "sh -c '" . str_replace("'", "'\''", $this->task->command) . "'";
|
||||
$exec = "docker exec {$containerName} {$cmd}";
|
||||
$this->task_output = instant_remote_process([$exec], $this->server, true);
|
||||
$this->task_log->update([
|
||||
|
|
|
|||
Loading…
Reference in a new issue