Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

Increase scheduled task timeout limit to 36000 seconds

Andras Bacsaid3eaae1aead2
diff --git a/app/Jobs/ScheduledTaskJob.php b/app/Jobs/ScheduledTaskJob.php
index e55db54407..4cf8f0a6e9 100644
--- a/app/Jobs/ScheduledTaskJob.php
+++ b/app/Jobs/ScheduledTaskJob.php
@@ -139,7 +139,7 @@ class ScheduledTaskJob implements ShouldQueue
if (count($this->containers) == 1 || str_starts_with($containerName, $this->task->container.'-'.$this->resource->uuid)) {
$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_output = instant_remote_process([$exec], $this->server, true, false, $this->timeout);
$this->task_log->update([
'status' => 'success',
'message' => $this->task_output,
diff --git a/app/Livewire/Project/Shared/ScheduledTask/Add.php b/app/Livewire/Project/Shared/ScheduledTask/Add.php
index d7210c15df..2d6b76c25f 100644
--- a/app/Livewire/Project/Shared/ScheduledTask/Add.php
+++ b/app/Livewire/Project/Shared/ScheduledTask/Add.php
@@ -41,7 +41,7 @@ class Add extends Component
'command' => 'required|string',
'frequency' => 'required|string',
'container' => 'nullable|string',
- 'timeout' => 'required|integer|min:60|max:3600',
+ 'timeout' => 'required|integer|min:60|max:36000',
];
protected $validationAttributes = [
diff --git a/app/Livewire/Project/Shared/ScheduledTask/Show.php b/app/Livewire/Project/Shared/ScheduledTask/Show.php
index 088de0a761..f7947951be 100644
--- a/app/Livewire/Project/Shared/ScheduledTask/Show.php
+++ b/app/Livewire/Project/Shared/ScheduledTask/Show.php
@@ -40,7 +40,7 @@ class Show extends Component
#[Validate(['string', 'nullable'])]
public ?string $container = null;
- #[Validate(['integer', 'required', 'min:60', 'max:3600'])]
+ #[Validate(['integer', 'required', 'min:60', 'max:36000'])]
public $timeout = 300;
#[Locked]