-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Multiple Schedule objects from one task-file #53
Comments
Hello, You can do it already, but with multiple events: $commands = [
[
'command' => 'php -v',
'cron' => '* * * * *',
],
[
'command' => 'php -v',
'cron' => '* * * * *',
],
];
$schedule = new Schedule();
foreach ($commands as $command) {
$task = $schedule->run($command['command']);
$task->cron($command['cron']);
}
return $schedule; |
Hello. |
@ivankuraev could You post some code to reproduce? |
It's a little problematic to give complete working code to run it. |
It happens because both commands generate same hash for |
Description
It would be very helpful to have a possibility to return multiple different
Schedule
objects from one task-file.One possible usage scenario is external schedule source for Schedules.
Possible implementations are simple array or a Schedule-collection object.
Example
The text was updated successfully, but these errors were encountered: