Laravel 5 Schedular vs Indatus Dispatcher


Laravel 5 Schedular vs Indatus Dispatcher

我一直在看Indatus Dispatcher(https://github.com/Indatus/dispatcher)而且它看起来比Laravel 5中内置的Scheduler灵活得多。

例如,使用Dispatcher,我可以:

...->daysOfTheMonth([1, 15])

在每个月的1号和15号执行命令。

从我所看到的,你不能用Scheduler:做到这一点

...->monthly(1, 15)

这不起作用,因为该函数不接受任何参数。

是我遗漏了什么,还是Dispatcher好多了?

Indatus Dispatcher与Laravel 5不兼容。它已经停产,因为大部分功能现在默认包含在Laravel 5中。

你总是可以运行自定义的cron时间-所以你真的可以用Laravel 5做任何你喜欢的调度:

...->cron('0 0 1,15 * * *')