I have an automatic checker that checks for domains that are going to expire within the next 7 days and it sends and email to the customer.
Im using this SQL Query:
If you need to advise the rows missed during the checker stops running, meaby you should use a extra tag to indicate if the domain have been advise or not. After that, you must select all the rows with date lower than now + 7 days and tag as "not advised". After sending the email tag it as "advised". And when they re-new the domain tag back as "not advise".