| Author |
Message |
AYK Hangin' Around

Joined: Apr 03, 2004 Posts: 32
|
Posted:
Sun May 23, 2004 12:18 am |
|
I have a question :
Is it possible to execute a certain PHP script at a certain time. My question is probably pretty vague, therefore this example :
DevShed sends out an e-mail every day at a certain time, telling what new topics have been added to their forums. I think I would be able to create this e-mail using PHP, but I wouldn't know how to get that script to run every day at say 0:00 AM.
Any ideas ? |
|
|
|
 |
sixonetonoffun Spouse Contemplates Divorce

Joined: Jan 02, 2003 Posts: 2499
|
Posted:
Sun May 23, 2004 1:03 am |
|
You should be able to use win cron or cron depending on your system. Also there is a timer php version of cron I think on sourceforge. Any of those should come up on all the major search engines with adaquite instructions. |
|
|
|
 |
AYK Hangin' Around

Joined: Apr 03, 2004 Posts: 32
|
Posted:
Sun May 23, 2004 1:14 am |
|
Thanks for the fast and adequate respnonse.
But another question popped into my mind : how would I get it done when my site's on an ISP ? Can cron execute remote scripts too ? |
|
|
|
 |
sixonetonoffun Spouse Contemplates Divorce

Joined: Jan 02, 2003 Posts: 2499
|
Posted:
Sun May 23, 2004 2:53 am |
|
Not alone it can only execute scripts at a given time. You can use some ftp programs with task scheduler to execute and retrive files. Your being a little vague so I can't reply to the specifics. Heck even Outlook can retrieve mail on a scheduled interval. So what is it your really trying to achieve? |
|
|
|
 |
AYK Hangin' Around

Joined: Apr 03, 2004 Posts: 32
|
Posted:
Sun May 23, 2004 2:46 pm |
|
Sorry for my vagueness.
It's just : PHP and MYSQL has been my first real programming experience, and I love it ! I really love it. I've been playing around with it for 3 months with guestbooks, user logins with cookies, avatars, session stuff. Probably all really basic to advanced programmers, but for a plain physics student like me a real eye-opener.
Now when I come across certain web-site thingies I ask myself - can/could I do this - how could those guys have done this and that etc etc.
Like the DEVSHED forums - they have a weekly update that's obviously created automatically and contains new thread-subjects since the last update or something like that.
I thought to myself : ok - I think I could create a script that could do this, but how could I get it to execute every sunday at noon or whatever. Ok, windows scheduler is an option, or forcing myself to surf to the script every Sunday.
But I couldn't believe the pro's would do it like this, and that's why I asked. Not for a perticular job especially - just out of curiosity. To enhance my skills and knowledge. |
|
|
|
 |
|
|
|
|