Skip to content

Commit

Permalink
adding quarterlyOn cron schedule frequency command (#42692)
Browse files Browse the repository at this point in the history
* adding quarterlyOn cron schedule frequency command

* Update ManagesFrequencies.php

Co-authored-by: Matyas Groger <matyas.groger@peoplefone.com>
Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
3 people authored Jun 7, 2022
1 parent 302a579 commit 5c488a0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Illuminate/Console/Scheduling/ManagesFrequencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,21 @@ public function quarterly()
->spliceIntoPosition(4, '1-12/3');
}

/**
* Schedule the event to run quarterly on a given day and time.
*
* @param int $dayOfQuarter
* @param int $time
* @return $this
*/
public function quarterlyOn($dayOfQuarter = 1, $time = '0:0')
{
$this->dailyAt($time);

return $this->spliceIntoPosition(3, $dayOfQuarter)
->spliceIntoPosition(4, '1-12/3');
}

/**
* Schedule the event to run yearly.
*
Expand Down

0 comments on commit 5c488a0

Please sign in to comment.