in lumen v8 I had access to artisan schedule:*
commands.
After upgrading lumen to v9:
"laravel/lumen-framework": "^9",
The artisan command console is missing the artisan schedule:*
commands (like artisan schedule:run
)!
Were they removed in lumen v9? The documentation does not mention if they were.
https://lumen.laravel.com/docs/9.x/releases
Thanks!
My Answer:
In Laravel Lumen version 9, the `php artisan schedule` command has been removed. This command was used to manage scheduled tasks in Lumen applications.
Instead of using the `php artisan schedule` command, you can now define your scheduled tasks directly in your `app/Console/Kernel.php` file.
Here is an example of how you can define a scheduled task in Lumen version 9:
php
protected function schedule(Schedule $schedule)
{
$schedule->command('your:command')->daily();
}
You can define your scheduled tasks using the `schedule` method in the `Kernel.php` file and use the `command` method to specify the command that should be run and the frequency at which it should be run.
Remember to run `php artisan schedule:run` to execute your scheduled tasks at the specified times.
Rate this post
4 of 5 based on 9330 votesComments