ResamkitheDeveloper's avatar

ResamkitheDeveloper wrote a reply+100 XP

13h ago

Issue: command fails when i run php artisan schedule:run
  1. I don't have ->withCommands(). i however have ->withSchedule(function (Schedule $schedule) {...} and when i run php artisan schedule:list i get this
          • php artisan overdue:invoice-penalty ..................................... Next Due: 37 seconds from now
  1. No

  2. i did this several times and it still does not work

ResamkitheDeveloper's avatar

ResamkitheDeveloper wrote a reply+100 XP

14h ago

Issue: command fails when i run php artisan schedule:run

i got rid of the kernel file. i believe it's not required in laravel 12x

ResamkitheDeveloper's avatar

ResamkitheDeveloper wrote a reply+100 XP

16h ago

Issue: command fails when i run php artisan schedule:run

just to mention. This wasn't a fresh laravel 12x install but an updrade from 9x. Maybe i missed something but i did go through the docs and made sure i moved everything as needed. Everything else is working just fine apart from this only.

ResamkitheDeveloper's avatar

ResamkitheDeveloper wrote a reply+100 XP

17h ago

Issue: command fails when i run php artisan schedule:run

the command file name is OverdueInvoicePenalty.php and i already have this in it

namespace App\Console\Commands;

use Illuminate\Console\Command;

class OverdueInvoicePenalty extends Command {....}

ResamkitheDeveloper's avatar

ResamkitheDeveloper wrote a reply+100 XP

17h ago

Issue: command fails when i run php artisan schedule:run

its shows this error

There are no commands defined in the "overdue" namespace.

ResamkitheDeveloper's avatar

ResamkitheDeveloper wrote a reply+100 XP

17h ago

Issue: command fails when i run php artisan schedule:run

protected $signature = 'overdue:invoice-penalty';

ResamkitheDeveloper's avatar

ResamkitheDeveloper wrote a reply+100 XP

18h ago

Issue: command fails when i run php artisan schedule:run

none of my commands show either when i do php artisan list

ResamkitheDeveloper's avatar

ResamkitheDeveloper wrote a reply+100 XP

18h ago

Issue: command fails when i run php artisan schedule:run

i have the signature defined correctly but still getting the error. when i run schedule:run it shows 2026-06-17 16:08:47 Running ["artisan" xxxxx:xxxxx].....DONE then the log files show the error.

ResamkitheDeveloper's avatar

ResamkitheDeveloper started a new conversation+100 XP

19h ago

Issue: command fails when i run php artisan schedule:run

I am getting the following error when i run php artisan schedule:run There are no commands defined in the "xxxxx" namespace. {"exception":"[object] (Symfony\Component\Console\Exception\NamespaceNotFoundException(code: 0):

Both my command and app.php files look okay. I am using withschedule like

->withSchedule(function (Schedule $schedule) { $schedule->command('xxxxx:xxxxx')->daily(); })

I am on laravel 12.62.0

what could i be missing?