Scheduled cron job to check for pending activity

Posted by luckytaxi on Stack Overflow See other posts from Stack Overflow or by luckytaxi
Published on 2010-04-01T20:54:27Z Indexed on 2010/04/01 21:03 UTC
Read the original article Hit count: 160

Filed under:

Using PHP ...

This is for my personal use so I'm thinking maybe 3-4 emails a day. I'm at a point where I can send an email to a dedicated email address where my script parses the message and stores it into a DB. Now, I need to figure out the best way to check the records in the DB for any upcoming task. I feel like I'm missing something, maybe like a trigger field as to when a reminder should go out. However, that's not a concern to me at the moment since I'll just send an alert 15 mins prior to the due date.

Question is, shoudl I run a cron job that queries the DB every minute? I take it the query will have to say something like "select all tasks that is due within 15 minutes."

© Stack Overflow or respective owner

Related posts about php