Runtask broken in new update
Current Behavior
RunTaskJob dont work
Expected Behavior
Runtakjob Works
Steps to Reproduce
Run a scedle/task
Panel Version
1.12.1
Wings Version
1.12
Games and/or Eggs Affected
No response
Docker Image
No response
Error Logs
/var/www/pterodactyl/app/Jobs/Schedule/RunTaskJob.php
From:
$this->dispatch((new self($nextTask, $this->manualRun))->delay($nextTask->time_offset));
To:
self::dispatch($nextTask, $this->manualRun)->delay($nextTask->time_offset);
log:[2026-02-14 22:21:42] production.ERROR: Pterodactyl\Jobs\Schedule\RunTaskJob::__construct(): Argument #1 ($task) must be of type Pterodactyl\Models\Task, Pterodactyl\Jobs\Schedule\RunTaskJob given, called in /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php on line 19 {"userId":1,"exception":"[object] (TypeError(code: 0): Pterodactyl\\Jobs\\Schedule\\RunTaskJob::__construct(): Argument #1 ($task) must be of type Pterodactyl\\Models\\Task, Pterodactyl\\Jobs\\Schedule\\RunTaskJob given, called in /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php on line 19 at /var/www/pterodactyl/app/Jobs/Schedule/RunTaskJob.php:21)
Is there an existing issue for this?
- [x] 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.
this is basicly the same as https://github.com/pterodactyl/panel/issues/5258
quick fix: /var/www/pterodactyl/app/Jobs/Schedule/RunTaskJob.php
From: $this->dispatch((new self($nextTask, $this->manualRun))->delay($nextTask->time_offset));
To: self::dispatch($nextTask, $this->manualRun)->delay($nextTask->time_offset);
this is basicly the same as #5258
quick fix: /var/www/pterodactyl/app/Jobs/Schedule/RunTaskJob.php
From: $this->dispatch((new self($nextTask, $this->manualRun))->delay($nextTask->time_offset));
To: self::dispatch($nextTask, $this->manualRun)->delay($nextTask->time_offset);
Make a PR
Can confirm that the fix above worked for my docker installation, I had to use the following to patch it.
docker exec pterodactyl-panel-1 sed -i 's/$this->dispatch((new self($nextTask, $this->manualRun))->delay($nextTask->time_offset));/self::dispatch($nextTask, $this->manualRun)->delay($nextTask->time_offset);/g' /app/app/Jobs/Schedule/RunTaskJob.php
then restarted the worker
docker exec pterodactyl-panel-1 php artisan queue:restart
I did it but it still doesn't work, I changed this line of code but now the scheduler is not called automatically
~~The fix doesn't seem to be working for me either, no errors in the log either.~~
Apparently, the queue-worker died somehow
This fixed new run tasks, however existing schedules get stuck on Processing. I tried many things to fix this such as restarting services but nothing worked. I ended up running:
php artisan tinker --execute="DB::table('schedules')->where('is_processing', true)->update(['is_processing' => false]); echo 'done';"
php artisan tinker --execute="DB::table('tasks')->where('is_queued', true)->update(['is_queued' => false]); echo 'done';"
This fixed my schedules that where stuck (which was all of them).
Closing in favour of #5600 as it has more information in the report