I have interesting use-case - execute job on exact date every month, but for dates that are beyond last date of month, run job on last date. For example, job is arranged by user for 31st day - on months with 31 day it runs as expected , on months with less days, it runs on last date of this month. Or another example, job can be arranged on 30th day, so it runs on 30th day every month except February. As far as i understand hangfire doesnt have this behavior out of box. Is there some extension point in Hangfire for implementing this behavior ? (We would like to avoid scheduling logic in our jobs). Thanks.
So no one have ideas on recurrency extension ?
It is not exactly what you are asking, but perhaps the “last day of month” feature would help you:
Discussion:
HangFire roadmap:
Of course, to implement the “exact day” (not last day of month) feature for recurring jobs it is another thing.,
But one option that quickly comes to mind would be to create a recurring job for all months except feb to day 30 and another one for feb to day 28.
Yeah i thought about adding three jobs for a whole year, but there is problem with leap years that have 29 days in February, and running job on 28 of February on a leap year is not an option in my case, so i guess i have to write my own plugin to fit requirements (first thread was quite helpful yet). Thanks.