-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
Current Behavior
Schedules fail to execute on Panel v1.12.1 with Laravel 11. When triggered automatically, tasks immediately fail with Call to undefined function Illuminate\Support\enum_value(). When triggered manually via the Panel, the error is RunTaskJob::__construct(): Argument #1 ($task) must be of type Pterodactyl\Models\Task, RunTaskJob given.
Expected Behavior
Schedules should execute all tasks in sequence (send commands with delays, then restart) without errors.
Steps to Reproduce
- Run Panel v1.12.1 with Laravel 11 (composer.lock ships with laravel/framework v11.x)
- Create a schedule with multiple tasks (e.g. several
send commandactions with delays, followed by arestart) - Trigger the schedule manually or wait for automatic execution
- Observe the schedule stuck on
Processingor returning a generic error
Three bugs were identified and patched manually:
Fix 1 — ProcessScheduleService.php: dispatchNow() was removed in Laravel 11, replace with dispatchSync()
// Before
$this->dispatcher->dispatchNow($job);
// After
$this->dispatcher->dispatchSync($job);Fix 2 — RunTaskJob.php: failed() signature uses ?\Exception but Laravel 11 passes \Throwable, causing a TypeError
// Before
public function failed(?\Exception $exception = null)
// After
public function failed(?\Throwable $exception = null)Fix 3 — RunTaskJob.php: The class uses only the Queueable trait but not Dispatchable, so self::dispatch() in queueNextTask() is unavailable or behaves incorrectly. Adding Dispatchable and fixing the dispatch call resolves the issue.
// Add import
use Illuminate\Foundation\Bus\Dispatchable;
// Add to class
use Dispatchable, Queueable;
// Fix queueNextTask()
// Before
self::dispatch((new self($nextTask, $this->manualRun))->delay($nextTask->time_offset));
// After
self::dispatch($nextTask, $this->manualRun)->delay($nextTask->time_offset);Panel Version
1.12.1
Wings Version
1.12.1
Games and/or Eggs Affected
All eggs / all servers (schedule system is global)
Docker Image
N/A
Error Logs
https://ptero.co/AvWPftIs there an existing issue for this?
- I have searched the existing issues before opening this issue. I understand that maintainers may close this issue without communication if I have not provided sufficient information.