File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -231,6 +231,7 @@ public function schedule()
231231 public function cron ($ expression )
232232 {
233233 $ this ->schedule = $ expression ;
234+
234235 return $ expression ;
235236 }
236237
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public function connect($connection)
4343 foreach (glob (AppPaths ('jobs ' ) . '/*.php ' ) as $ file ) {
4444 require $ file ;
4545
46- /**@var \Leaf\Job */
46+ /** @var \Leaf\Job */
4747 $ job = new ("App \\Jobs \\" . pathinfo ($ file , PATHINFO_FILENAME ))();
4848
4949 if ($ schedule = $ job ->schedule ()) {
@@ -145,6 +145,7 @@ public function writeDueSchedulesToQueue()
145145 protected function getNextRunTime (string $ cronExpression ): string
146146 {
147147 $ cron = new \Cron \CronExpression ($ cronExpression );
148+
148149 return $ cron ->getNextRunDate ()->format ('Y-m-d H:i:s ' );
149150 }
150151
@@ -156,6 +157,7 @@ protected function getNextRunTime(string $cronExpression): string
156157 protected function isDue (string $ cronExpression ): bool
157158 {
158159 $ cron = new \Cron \CronExpression ($ cronExpression );
160+
159161 return $ cron ->isDue ();
160162 }
161163
You can’t perform that action at this time.
0 commit comments