File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,11 @@ class Kernel extends ConsoleKernel
2424 */
2525 protected function schedule (Schedule $ schedule )
2626 {
27- $ min = config ('app.scheduled ' );
27+ $ hour = config ('app.hour ' );
28+ $ min = config ('app.min ' );
29+ $ scheduledInterval = $ hour !== '' ? ( ($ min !== '' && $ min != 0 ) ? $ min .' */ ' . $ hour .' * * * ' : '0 */ ' . $ hour .' * * * ' ) : '*/ ' . $ min .' * * * * ' ;
2830 if (env ('IS_DEMO ' )) {
29- $ schedule ->command ('migrate:fresh --seed ' )->cron (' */ ' . $ min . ' * * * * ' );
31+ $ schedule ->command ('migrate:fresh --seed ' )->cron ($ scheduledInterval );
3032 }
3133 }
3234
Original file line number Diff line number Diff line change 33return [
44
55 'scheduled ' => env ('SCHEDULED_TIME ' , 15 ),
6+ 'hour ' => env ('SCHEDULED_HOUR ' , '' ),
7+ 'min ' => env ('SCHEDULED_MIN ' , '' ),
68
79 /*
810 |--------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments