tbar0970 / jethro-pmm

Jethro Pastoral Ministry Manager
GNU General Public License v3.0
36 stars 26 forks source link

Reminder script #366

Open vanoudt opened 7 years ago

vanoudt commented 7 years ago

Loving the idea of the reminder script. But having a bit of an issue with it. I'd prefer to have the reminders sent if the date in the custom field is within the INTERVAL period, not just when it is EXACTLY that.

That is, I want to be able to send, for example, SafeChurch reminders for those whose training is due in the next 90 days. The cron job runs once a week, giving them that information once a week...

Simply changing WHERE cfv.value_date = CURDATE() + INTERVAL '.(int)$ini['REMINDER_OFFSET'].' DAY to WHERE cfv.value_date <= CURDATE() + INTERVAL '.(int)$ini['REMINDER_OFFSET'].' DAY does the trick. It also points out those who are now overdue... Not sure if you'd want another parameter to choose between "Exactly on this date" or "anytime within the next interval".

tbar0970 commented 7 years ago

I reckon a new parameter in the reminder script INI file would be the way to go. Make it backwards compatible so if the new parameter is absent, it defaults to existing behaviour.