Using PHP, I have a query that goes through my DB looking for pending tasks with reminder triggers at certain times of the day. I have a cronjob that runs every 10 mins and chec
If you want to do a mail queue system I would suggest you take a look at PEAR::Mail_Queue and the associated tutorial.
You would be able to queue up mail when your 10minute script ran, and have the mail queue emptied every 10 minutes via a cron job. You could also have the mail queue emptied every minute and implement a 'do not send before' time in the queue on the mail in question.
Alternatively you could run your checking script every minute checking for items that a reminder is due in the last ten minutes and send the mail immediately, which removes the need for a queue system.
This could be implemented by a record of when you last sent alerts (so that you don't miss any and don't send alerts twice)
Hope that helps.