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

Tasks order #358

Closed
davidduda111 opened this issue Apr 14, 2021 · 3 comments
Closed

Tasks order #358

davidduda111 opened this issue Apr 14, 2021 · 3 comments

Comments

@davidduda111
Copy link

Description

Is it possible to define order in which tasks should be executed?

For example

$task = $schedule->run('echo "Hello there!"')->order(1)->everyMinute();
$task = $schedule->run('echo "Hello there again!"')->order(2)->everyMinute();

@PabloKowalczyk
Copy link
Collaborator

PabloKowalczyk commented Apr 22, 2021

Hello, ordering execution is not possible at the moment. What is your use case?

@rodneyo
Copy link

rodneyo commented Dec 27, 2022

My particular use case is the following:
I have a task that must run and complete successfully before the second task can run. Being able to specify the order or better specify that task 1 must complete successfully before running task 2 would be great. I could possibly accomplish this with an "after()" event call back. Not sure how I could do this. task 1 would have to emit some sort of event that task 2 would "listen" for

@PabloKowalczyk
Copy link
Collaborator

This repo is no longer maintained, please see #411

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

No branches or pull requests

3 participants