Skip to content

Running from the Laravel scheduler #39

Open
@mark1282

Description

@mark1282

In the docs for Enlightn it provides the following code snippet. It's my understanding that these tasks always run in the background when running from the Kernel.php therefore the line ->runInBackground() isn't necessary. I'm currently upgrading from Laravel 8 to 9 and it's been flagged by Laravel shift that having this in would now raise an exception and should be removed. Should the Enlightn docs be updated to reflect this?

// In your app/Console/Kernel.php file:

/**
 * Define the application's command schedule.
 *
 * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
 * @return void
 */
protected function schedule(Schedule $schedule)
{
    $schedule->command('enlightn --report')->runInBackground()->daily()->at('01:00');
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions