Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending mail at a later date 1

Status
Not open for further replies.

lifelineamerica

Programmer
Aug 9, 2006
23
US
I have a system set up where a bunch of users log in daily.
I want users to be able to set reminder emails to each other to check on certain tasks, but such emails are to be sent at later dates.

I guess I can:
1). store the contents of the form into database with the timestamp of the time it was submitted.
2). make a script that will be executed every day to check that timestamp; if timestamp + 7 days is >= to today's timestamp then send the email...

...and I would set that to always run in the background i.e. whenever anybody logs in - problem is; on a day that nobody logs in, obviously no email would go out.

So any better ideas?
 
Hi

lifelineamerica said:
...and I would set that to always run in the background i.e. whenever anybody logs in - problem is; on a day that nobody logs in, obviously no email would go out
Correct. That is poor man's scheduling.

Better set up your system's native scheduler instead of reinventing the wheel. Use [tt]cron[/tt] on Unix/Unix-like systems, or Task Scheduler on Windows. ( There are many [tt]cron[/tt] clones, including for Windows. ) If none is available, try an online one, for example Onlinecronjobs.

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top