panel icon indicating copy to clipboard operation
panel copied to clipboard

Runtask broken in new update

Open minexnode opened this issue 9 months ago • 7 comments

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.

minexnode avatar Feb 14 '26 21:02 minexnode

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);

minexnode avatar Feb 14 '26 21:02 minexnode

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

voidvalue-dev avatar Feb 15 '26 17:02 voidvalue-dev

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

n-winspear avatar Feb 20 '26 14:02 n-winspear

I did it but it still doesn't work, I changed this line of code but now the scheduler is not called automatically

Image Image

DmmRS avatar Feb 20 '26 20:02 DmmRS

~~The fix doesn't seem to be working for me either, no errors in the log either.~~

Apparently, the queue-worker died somehow

Gaz492 avatar Feb 26 '26 13:02 Gaz492

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).

soerr avatar Mar 01 '26 05:03 soerr

Closing in favour of #5600 as it has more information in the report

danny6167 avatar Mar 25 '26 03:03 danny6167