hmazter / laravel-schedule-list

Laravel package to add command to list all scheduled artisan commands
MIT License
94 stars 14 forks source link

between() and unlessBetween() aren't factored in #3

Closed intrepidws closed 4 years ago

intrepidws commented 7 years ago

This may be due to the way Laravel handles these two functions differently from other scheduler functions, but this package doesn't seem to take into account between() and unlessBetween().

The following two commands output */10 * * * * * when running php artisan schedule:list

$schedule->command('name-of-command')->everyTenMinutes();

and

$schedule->command('name-of-command')->everyTenMinutes()->between('8:55', '19:00');
hmazter commented 7 years ago

Good find. And it's as you say that between and unlessBetween does not alter the schedule but adds an "exception" of only/skip limits to the scheduler.

What I can see right now that this only/skip limits is not publicly accessible properties and I can't access them for building any output.

pashamesh commented 7 years ago

when and skip the same

eleftrik commented 7 years ago

Same here. For example, if when() is returning false, the task get listed anyway. @hmazter, is there any chance to change this behaviour? Or is there any limit due to properties accessibility? Thank you

hmazter commented 7 years ago

Right now I don't have a way to access and/or process those properties.

But if I could come up with a way to do that, how is the desired behavior for the output then? Since the output right now is based on the crontab expression and those properties could go beyond what that expression can handle/express. That's why they are added to the scheduler in a separate way and evaluated at runtime.

hmazter commented 4 years ago

Closing as I see no need to address this in the package