Click to See Complete Forum and Search --> : scheduled e-mail sendings
Kagey
May 20th, 2003, 02:04 PM
hey all,
one of my clients has a php based website and he wants a feature put in where an email can be made up, then scheduled to be sent at a particular date.
i know how to do all the email stuff, but i was wondering how i can schedule something like that in php, and if not, how else can i do it?
thanks for any advice
TheGoldenShogun
May 20th, 2003, 03:47 PM
for scheduling a time to execute something, I believe you would need to set up a kron job. I could be wrong but I have never been able to schedule anything in php. I always just write up a perl kron job script.
Kagey
May 20th, 2003, 04:28 PM
interesting. i dont know perl or that much about unix/linux,,,
so what i would have to do is be able to access the server and setup a kron job that would run my perl script every day? then that perl script would check the mysql database for email that has to be sent and sends it? is that correct?
The Hobo
May 20th, 2003, 06:23 PM
A Cron Job allows you to schedule a php or perl script to run at a certain interval on a Unix (and probably Linux) system. I'm not exactly sure how to set one up, because my host offers such capability through the user Control Panel.
The Hobo
May 20th, 2003, 06:25 PM
I don't know if this will help, but it's the best I could find on a quick google search: http://how-to.dnswatch.com/cronhelp.php4
Kagey
May 20th, 2003, 07:25 PM
oh deadly, you can make it run a php script? that is even better since i dont know perl :)
thanks for the link, will take a look
Kagey
May 20th, 2003, 07:31 PM
nice like hobo, i understand it now. but how can i set it up so that a php script is run? and is there anything special i have to include in my php script to make able to be run via command line?
also what would be the 'command' section, since you cant just run a php script by itself (i assume you have to use the interpreter some how)
thanks
The Hobo
May 20th, 2003, 09:14 PM
This site (http://www.phpfreaks.com/tutorials/28/0.php) looks as if it explains how to set it up to run a php script. I don't have Linux on any of my machines anymore, so I can't test it for you to see.
Kagey
May 20th, 2003, 09:52 PM
lol thanks for doing all the grunt work for me hobo, you're quite a guy!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.