Skip to content

with "simplified" app.php Schedule initiates on any command #58079

@yurii-stickee-2023

Description

@yurii-stickee-2023

Laravel Version

11.47.0 / 12.42.0

PHP Version

8.3

Database Driver & Version

No response

Description

With this new "simplified" bootstrap/app.php approach \Illuminate\Console\Scheduling\Schedule object is now initiated on EVERY command, not only on commands that actually use it, like schedule:run.

Steps To Reproduce

Specifically it triggers this \Illuminate\Foundation\Providers\FoundationServiceProvider::registerConsoleSchedule all the time.

I made events as suggested by docs by adding scheduled items to routes/console.php.

Tried to use bootstrap/app.php

    ->withSchedule(function ($schedule) {
    })

but it has the same effect.

Is there a way with this "simplified" architecture to add scheduled events here \Illuminate\Foundation\Console\Kernel::schedule() so they are initiated ONLY by commands that use schedule?

Is this a bug or a feature now?

regards

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