File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace RalphJSmit \LaravelHorizonCron \Supervisor ;
4
4
5
- use Illuminate \Console \Scheduling \Event ;
6
5
use Illuminate \Console \Scheduling \Schedule ;
7
6
use Illuminate \Support \ServiceProvider ;
8
7
@@ -20,12 +19,13 @@ public function boot(): void
20
19
21
20
$ this ->app ->booted (function () {
22
21
if (config ('horizon-cron-supervisor.enabled ' )) {
23
- $ expression = config ('horizon-cron-supervisor.schedule ' );
24
22
$ schedule = $ this ->app ->make (Schedule::class);
25
23
26
- $ schedule ->command ('supervisor:check ' )->tap (
27
- fn (Event $ event ) => $ event ->expression = is_numeric ($ expression ) ? "*/ {$ expression } * * * * " : $ expression
28
- );
24
+ $ expression = config ('horizon-cron-supervisor.schedule ' );
25
+
26
+ $ schedule
27
+ ->command ('supervisor:check ' )
28
+ ->cron (is_numeric ($ expression ) ? "*/ {$ expression } * * * * " : $ expression );
29
29
}
30
30
});
31
31
}
You can’t perform that action at this time.
0 commit comments