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 22
33namespace RalphJSmit \LaravelHorizonCron \Supervisor ;
44
5- use Illuminate \Console \Scheduling \Event ;
65use Illuminate \Console \Scheduling \Schedule ;
76use Illuminate \Support \ServiceProvider ;
87
@@ -20,12 +19,13 @@ public function boot(): void
2019
2120 $ this ->app ->booted (function () {
2221 if (config ('horizon-cron-supervisor.enabled ' )) {
23- $ expression = config ('horizon-cron-supervisor.schedule ' );
2422 $ schedule = $ this ->app ->make (Schedule::class);
2523
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 );
2929 }
3030 });
3131 }
You can’t perform that action at this time.
0 commit comments