Command - Best option for reminder emails 2 weeks before due date column
Hi all,
I have a command that pulls out entries from the DB that will have a due date that's 2 weeks from current date. I'm able to send the reminder email etc but what I need some opinions on is the following;
Since the reminder emails are being sent 2 weeks before the due date, I need some way of not sending duplicate notifications. Is it a good idea to put another column to update after sending the reminder? Maybe reminder_sent boolean or reminder_at date?
Is it a good idea to put another column to update after sending the reminder?
Yes, that's what I recently did in an accounting app, but in my case I had a isprt (is printed) flag set to tinyint for a 0 or 1. And also thanks so much for all your help, it's members like you that helped me learn so much about laravel.
@bashy you're running the command once per day, I suppose, I can not see why duplication will happen if you are filtering by equal to today plus two weeks.
I have three of this commands without any additional field.
@Ricardo What time would you run it daily? If I run it just after midnight, it won't then catch any entries added that day that have a 2 week timeframe? Or am I thinking about it too much...