Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduler commands order #116

Closed
arall opened this issue Jan 29, 2018 · 2 comments
Closed

Scheduler commands order #116

arall opened this issue Jan 29, 2018 · 2 comments

Comments

@arall
Copy link

arall commented Jan 29, 2018

Is there any way of defining the cron command order? For example, having two commands running every minute, define which one is going to be executed first.

@nunomaduro
Copy link
Member

nunomaduro commented Jan 30, 2018

@arall Sure. Removed the schedule method from your commands. Then in your AppServiceProvider just put:

        $this->app[\Illuminate\Console\Scheduling\Schedule::class]->command(InspiringCommand::class)->everyMinute();
        $this->app[\Illuminate\Console\Scheduling\Schedule::class]->command(HelloCommand::class)->everyMinute();

Normally the InspiringCommand runs first.

@nunomaduro
Copy link
Member

@arall Have news on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants