homepage Welcome to WebmasterWorld Guest from 54.163.72.86
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
creating events at arbitrary times
whatson




msg:4543693
 3:17 am on Feb 8, 2013 (gmt 0)

I want to email people on a regular basis, that they choose. e.g. it might be once a week or once a month.
Their frequency will come from a database, and they can adjust it also.

e.g. one row will contain e.g. once a week as the frequency, along with their email address, and they will be emailed once a week, where as another one maybe once a month.

I looked into doing a cron job, but that doesn't seem to be the answer here. Any other ideas?

 

swa66




msg:4543771
 10:45 am on Feb 8, 2013 (gmt 0)

Easiest is to also store when you last mailed them.
Then iterate through the list on a regular (e.g. daily basis), and send out those that need an update.

If you do it like this, even if it would stop halfway for whatever reason, the next day would pick up the slack, even if it were to start twice for some reason: no doubles would be sent out.

A daily cron entry e.g. would be ideal in my mind.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved