简体   繁体   中英

php schedule email so many days before a date stored in db

how would i go about scheduling an email to go out so many days/weeks before a certain date?

I have a cron job setup for a reminder service i am creating. At the moment the cron job sends out the email reminders on the day. I would like to send the email reminder out lets say 2 weeks before the date that's stored in the database.

Any ideas on how to achieve this?

Thanks, Dan

您几乎已经采用了这种逻辑,如果您在当天发送电子邮件,则只需将应该检查的日期从今天更改为将来的两周。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM