ResamkitheDeveloper wrote a reply+100 XP
10h ago
didn't work either
ResamkitheDeveloper wrote a reply+100 XP
13h ago
- 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
-
-
-
-
No
-
i did this several times and it still does not work
ResamkitheDeveloper wrote a reply+100 XP
14h ago
i got rid of the kernel file. i believe it's not required in laravel 12x
ResamkitheDeveloper wrote a reply+100 XP
16h ago
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 wrote a reply+100 XP
17h ago
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 wrote a reply+100 XP
17h ago
its shows this error
There are no commands defined in the "overdue" namespace.
ResamkitheDeveloper wrote a reply+100 XP
17h ago
protected $signature = 'overdue:invoice-penalty';
ResamkitheDeveloper wrote a reply+100 XP
18h ago
none of my commands show either when i do php artisan list
ResamkitheDeveloper wrote a reply+100 XP
18h ago
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 started a new conversation+100 XP
19h ago
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?