Jump to content

handling events on a date


1internet

Recommended Posts

I want to send an email every 7 days. Essentially a row is picked out at random from a database, and their email address is taken and they are emailed. Every 7 days another one at random is chosen, and again they are emailed.

 

So I am guessing it would have something to do with the current date, and then worked out somehow if it is a multiple of 7 and if so email them that day? I am not entirely sure, and really cant get my head around this one. How is this done?

Link to comment
https://forums.phpfreaks.com/topic/274025-handling-events-on-a-date/
Share on other sites

You simply need create a script to perform the process as you described. Then create a scheduled task to run every seven days to execute that task. On a Linux server this is typically handled through a CRON job. Your host should have a way of scheduling these

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.