File tree Expand file tree Collapse file tree
src/Illuminate/Foundation/Console Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,14 +99,25 @@ public function __construct(Application $app, Dispatcher $events)
9999 protected function defineConsoleSchedule ()
100100 {
101101 $ this ->app ->singleton (Schedule::class, function ($ app ) {
102- return new Schedule ($ this ->scheduleTimezone ());
102+ return (new Schedule ($ this ->scheduleTimezone ()))
103+ ->useCache ($ this ->scheduleCache ());
103104 });
104105
105106 $ schedule = $ this ->app ->make (Schedule::class);
106107
107108 $ this ->schedule ($ schedule );
108109 }
109110
111+ /**
112+ * Get the name of the cache store that should manage scheduling mutexes.
113+ *
114+ * @return string
115+ */
116+ protected function scheduleCache ()
117+ {
118+ return $ _ENV ['SCHEDULE_CACHE_DRIVER ' ] ?? null ;
119+ }
120+
110121 /**
111122 * Run the console application.
112123 *
You can’t perform that action at this time.
0 commit comments