PDA

View Full Version : Stupid question


Nightfire
11-04-2002, 02:07 PM
Bit of a stupid question, but I've no idea what the answer is. If I created a page that emails people on certain dates, would that page only work if someone went to it, or will it always run?

I'm thinking of creating an email script that emails someone when it's their birthday, but I don't know if I'd have to go to that page all the time to be able to send the email, or if it finds the dates and send the emails byitself, without anyone needing to go to the page.

Spookster
11-04-2002, 03:39 PM
PHP cannot execute itself. Since it is probably not feasible to wait til someone goes to the page you might want to look into CRON jobs.

Nightfire
11-04-2002, 03:53 PM
Thanks. Am I right in thinking CRON can't be done unless you own the server?

I think I might include the php script into the index page and silently execute the script.

kalm
11-04-2002, 04:03 PM
Check with your Hosting supplier as some allow you to run CRON jobs.

Nightfire
11-04-2002, 04:13 PM
Thanks :) I've just sent the email to the host.

Nightfire
11-04-2002, 04:28 PM
Looks like I have to use the php include way. My host doesn't support CRON :(

Spookster
11-04-2002, 04:48 PM
What a crummy host. What you are trying was going to be the other way I suggested but that still depends on someone opening the page at least once per day. My host supports CRON jobs and they even give you a webbased interface for it if you don't like using command line.

Nightfire
11-04-2002, 05:07 PM
Was thinking of adding it into my header. That way atleast it'll run somewhere on the site. Never heard of CRON before today, and still not entirely sure what it is. Anyway to get it to run on a windows machine? I'd like to have a play with it, even if I can't use it on my host.

Socraties
11-04-2002, 07:54 PM
here is a thought for you. If you want to be able to run a cron job from a server, along with many other things. I am gonna give you the url to the company that hosts my site. they are a good reliable company and give you a lot for your money. Please check them out. If you like their service please let me know, as I am looking into partnering with them as a reseller.
Thanks,

http://www.westhost.com

Nightfire
11-04-2002, 08:03 PM
That host looks much better than mine. Are you using them now? What's their tech support like? :D Think I found meself a new host

Socraties
11-04-2002, 11:00 PM
They host my site and I do have a re-seller account through them. Their tech support is great, Mostly done through email. One of the sites I have resold is http://www.deploygeneral.com. He is a co-worker of mine and he has had nothing but praise for the tech support he has recieved from them. He had his site up and running in 3 days from the time he set it up. My site is also hosted with them http://www.socraties.com although i have torn my site apart so nothing works on it anymore hehe. Anyways I think they are an awesome company, and they offer a boat load of hosting options. I am glad my that my link to them has helped you. :)

Spookster
11-05-2002, 01:09 AM
Or if you want even more for your money the host I use hostrocket.com is a very nice choice. On top of everything they will give you Secure Shell access to set up your CRON jobs not to mention they have a web based interface for setting them up as well.

whackaxe
11-05-2002, 06:22 PM
if you folks speak fluent french you can try www.webcron.org . there must be english versions but i still havent found one. otherwise couldnt you write a program that makes a HTTP connection at a certain time/ but then again you would have to run your computer all day