|
Servers have scheduling systems - you can schedule a server to run a script at any time, and schedule it all in advance. However this usually requires your hosting is "server hosting" and not just site hosting.
Even if you have only site hosting, some hosts give you some scheduling options sometimes, I think. With linux it's called Crontab, with windows it's probably just something like Windows Scheduler.
Eg for me to do this sort of thing is easy, I'd create a script (whether php or cgi-perl) which did the emailing after opening up some details from a table telling it what to send, depending on what day it was and who it was going to, and I'd tell the crontab what days and times to open the script and run it. That would be that. (In fact my crontab runs a script each day which goes to the affiliate networks, gets my tally, adds it up, and then sends me an email telling me what I've got)
I don't believe you can do this job without a scheduler, unless you have a macro or something similar on your home computer which is in charge of the schedule and then all you need is one easy-to-make php script which you can get your macro to open in a browser at a specific time of day, etc.
I checked a leading provider of hosting and it seems that server hosting is getting costlier, and also it seems unlikely you'll get scheduling on a basic hosting account.
There IS one clever tricky way of getting the thing done online without a real scheduler - you could have a php script which is actually your front page - and a tiny low-memory process can be added to it which, EVERY TIME someone uses your page, checks to see if it's time to send another email/set-of-emails out. If it is, it'll run it, and the person who accessed the machine will be none the wiser that they triggered it.
That would actually work and still be secure and good. So it's a good way out if you are not at server level yet.
For that one you need - a php script which sends the email lesson - it should open a file up which contains a list of days and times and identities of email to send {contents can be in separate files}. If the present day and time match that, then the script sends out the email.
Then you add that php to your front page, which you change into a php script or, since you are not at server level and don't want to incorporate a php as your index (unless just calling a page index.php and removing the index.html ends up working fine - which it could well do) you could stick the php script for sending that thing - into an iframe or something - with its output as just a blank page, so a tiny little frame could be running it on the window really subtly without being even slightly noticeable.
Just some ideas. It just goes to show what the advantages of server hosting are, really. The internet has a lot less dimensions without all those extra capabilities.
|