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

Try Catch #81

Open
elvispdosreis opened this issue May 9, 2019 · 0 comments
Open

Try Catch #81

elvispdosreis opened this issue May 9, 2019 · 0 comments
Labels

Comments

@elvispdosreis
Copy link

what would be the best way for me to define a try catch on each task so that one task is not harmed by the other

<?php
            $this->scheduler->call(function () use (&$skyhub) {
                $skyhub->invoice();
            })->at('0,30 * * * *')->then(function ($output) use (&$logger) {
                if (!empty($output)) {
                    $logger->error("Skyhub Invoice - {$output}");
                }
            });

            $this->scheduler->call(function () use (&$skyhub) {
                $skyhub->shipped();
            })->at('0,30 * * * *')->then(function ($output) use (&$logger) {
                if (!empty($output)) {
                    $logger->error("Skyhub Shipped - {$output}");
                }
            });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants