Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Add yearlyOn() method to scheduler #34728

merged 2 commits into from Oct 7, 2020

[8.x] Add yearlyOn() method to scheduler #34728

merged 2 commits into from Oct 7, 2020


Copy link

@u01jmg3 u01jmg3 commented Oct 7, 2020


I need to run a task once a year on a specific month (when the university term ends). Currently there is no expressive way to accomplish this with the available frequency options.

As weeklyOn($day, $time) and monthlyOn($day, $time) already exist, I simply used them as a guide and created yearlyOn($month, $day, $time).

// At 00:00 on day-of-month 1 in July.

// Before
$schedule->cron('0 0 1 7 *');

// After

@GrahamCampbell GrahamCampbell changed the title Add yearlyOn() method to scheduler [8.x] Add yearlyOn() method to scheduler Oct 7, 2020
Copy link

@GrahamCampbell GrahamCampbell commented Oct 7, 2020

I suppose other use cases for this would be generation of annual tax documents, and the like.

@taylorotwell taylorotwell merged commit 6d5f3d9 into laravel:8.x Oct 7, 2020
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants