I have a job I need to run once at year during a specific month.

Is it possible to configure during what month cronplus_yearly() will run?

We can select what hour and weekday to run in the admin but there are no options for month.

Comments

syscrusher’s picture

Wow...yearly, huh?

I never even considered the possibility someone would want to have that long a time span.

I'll need to take a look at the code; this may not be a hard patch.

cluke009’s picture

I ended up just making this particular feature manually triggered rather than using cronplus. I still think this would be a useful feature to include especially if its easy to implement.

I was looking to use this on a site for students to run a couple account related things over the summer break. I am sure there are other users out there that would like to implement similar things for yearly events school related functions. Using it to send reminder emails or account upgrades after a years membership etc..

NROTC_Webmaster’s picture

Status: Active » Needs review
StatusFileSize
new3.7 KB

I know this is old but I made a patch that should do what you are looking for. Test it out and see if it meets your needs.

NROTC_Webmaster’s picture

I did find one error in the patch

The line for

+    '#options' => _cronplus_int_options(0, 6, array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', ), TRUE),

should instead be

+    '#options' => _cronplus_int_options(0, 11, array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', ), TRUE),

I will try to upload a new patch later.