This topic is locked

warning email sent to at various points from start date

9/19/2009 7:03:28 PM
PHPRunner General questions
woodey2002 author

Hi Everyone,
Is it possible to have a automatic email sent at certain time periods from dates recorded in the database.
Example.
Patient is admitted to hospital.
Their admission date is recorded,
They have a estimated 2 weeks until a surgery date which has not yet been booked.
If no surgery is booked, and recorded in the database one week after the patients admission, could i set up a automatic warning email 7 days after their original admission and within the estimated time period of surgery booking which is 2 weeks, stating that no surgery has been booked.
Any ideas or directions would be much appreciated. As this would be a really cool feature.
Many thanks,
James
PhpRunner's No1 Irish fan <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=12771&image=1&table=forumtopics' class='bbc_emoticon' alt=':D' />

J
Jane 9/21/2009

James,
You need to use external scheduler like CRON for this purpose.
Write a script that checks the date and sends an email. Use cron to run this script on timely fashion i.e. once a day.

woodey2002 author 9/21/2009

Thanks again Jane,
Wahat would we do without you.
Regards,
James