From 447d4a61398a963193f60324da7a5a8f5b32e3df Mon Sep 17 00:00:00 2001 From: Viola Ceni Date: Fri, 19 Jun 2020 10:30:21 +0200 Subject: [PATCH 1/3] add time parameter on twiceMonthly function --- src/Illuminate/Console/Scheduling/ManagesFrequencies.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Illuminate/Console/Scheduling/ManagesFrequencies.php b/src/Illuminate/Console/Scheduling/ManagesFrequencies.php index a8cae0df98a..855d138e6b9 100644 --- a/src/Illuminate/Console/Scheduling/ManagesFrequencies.php +++ b/src/Illuminate/Console/Scheduling/ManagesFrequencies.php @@ -338,16 +338,18 @@ public function monthlyOn($day = 1, $time = '0:0') } /** - * Schedule the event to run twice monthly. + * Schedule the event to run twice monthly on a given time. * * @param int $first * @param int $second + * @param string $time * @return $this */ - public function twiceMonthly($first = 1, $second = 16) + public function twiceMonthly($first = 1, $second = 16, $time = '0:0') { $days = $first.','.$second; - + $this->dailyAt($time); + return $this->spliceIntoPosition(1, 0) ->spliceIntoPosition(2, 0) ->spliceIntoPosition(3, $days); From dd058b151199a34ddaf32e7fe32f542584f55522 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 19 Jun 2020 08:41:06 -0500 Subject: [PATCH 2/3] Update ManagesFrequencies.php --- src/Illuminate/Console/Scheduling/ManagesFrequencies.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Illuminate/Console/Scheduling/ManagesFrequencies.php b/src/Illuminate/Console/Scheduling/ManagesFrequencies.php index 855d138e6b9..9939b5ddaa4 100644 --- a/src/Illuminate/Console/Scheduling/ManagesFrequencies.php +++ b/src/Illuminate/Console/Scheduling/ManagesFrequencies.php @@ -338,7 +338,7 @@ public function monthlyOn($day = 1, $time = '0:0') } /** - * Schedule the event to run twice monthly on a given time. + * Schedule the event to run twice monthly at a given time. * * @param int $first * @param int $second @@ -348,6 +348,7 @@ public function monthlyOn($day = 1, $time = '0:0') public function twiceMonthly($first = 1, $second = 16, $time = '0:0') { $days = $first.','.$second; + $this->dailyAt($time); return $this->spliceIntoPosition(1, 0) From d2b08b5e9a9a23dd483df9af2035a9bc343d8cf1 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 19 Jun 2020 08:41:24 -0500 Subject: [PATCH 3/3] Update ManagesFrequencies.php --- src/Illuminate/Console/Scheduling/ManagesFrequencies.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Console/Scheduling/ManagesFrequencies.php b/src/Illuminate/Console/Scheduling/ManagesFrequencies.php index 9939b5ddaa4..dc1a51cf4a7 100644 --- a/src/Illuminate/Console/Scheduling/ManagesFrequencies.php +++ b/src/Illuminate/Console/Scheduling/ManagesFrequencies.php @@ -342,7 +342,7 @@ public function monthlyOn($day = 1, $time = '0:0') * * @param int $first * @param int $second - * @param string $time + * @param string $time * @return $this */ public function twiceMonthly($first = 1, $second = 16, $time = '0:0')