elmas156 Posted September 24, 2008 Share Posted September 24, 2008 Hello everyone, I've got a website for a business that is based on recurring service... usually every three months. I'm not using the normal mysql date format, I'm using month/day/year format (09/24/2008). What I want to do is create a system that will automatically send customers an email to remind them that their service is due and that they should schedule an appointment soon. For example, Customer 1 had service completed on 06/24/2008 and it's now 3 months, or 90 days later so I want to send Customer 1 an email reminding them that their service is due. I'm not sure where to start with this project. Does anyone have any ideas? Any input would be greatly appreciated. Thanks everyone. Quote Link to comment Share on other sites More sharing options...
ranjuvs Posted September 24, 2008 Share Posted September 24, 2008 Use cron job. Write a script which checks the date and if required send a mail. Set this script as a cron job which runs everyday or every week or every month. Quote Link to comment Share on other sites More sharing options...
DjMikeS Posted September 24, 2008 Share Posted September 24, 2008 You should create a php script that runs in the shell so that you can schedule it to run once a day. Loop through every user and check there last service date with today's date. If there's 90 days between that, send an email. Quote Link to comment Share on other sites More sharing options...
elmas156 Posted September 24, 2008 Author Share Posted September 24, 2008 Thanks, I just read up on cron jobs and that seems like an easy enough solution. About the script, I'm thinking using a unix time stamp would be the easiest way to check the dates to see if 90 days have passed. Do you guys have any other ideas or do you agree on the time stamp? Thanks alot, I really value the opinions I get here. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.