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

Linux Run Background Parallel #109

Open
elvispdosreis opened this issue Aug 1, 2020 · 0 comments
Open

Linux Run Background Parallel #109

elvispdosreis opened this issue Aug 1, 2020 · 0 comments

Comments

@elvispdosreis
Copy link

elvispdosreis commented Aug 1, 2020

I noticed that my scheduled processes run in sequence that were scheduled, and it is possible that these processes run in parallel.

in a simplified way and the way I use it, with an array containing all my tasks

$task = new Task('0 0,12 * * *', true, 'price', 'Price');
array_push($tasks, $task);

foreach ($tasks as  $task){
    /** @var $task Task */
    $scheduler->call(function (Task $task) {
        ...
    }, [$task], "{$task->getSlug()}")->at($task->getExpression())->before(function () {
        ...
    })->then(function ($output) {
        ...
    }, $task->isBackground())->onlyOne('/tmp/');
}
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

1 participant