Page 1 of 1

How to automatically run a PHP script daily?

Posted: Wed Apr 16, 2003 1:13 pm
by misch
Hi,
I am trying to run a PHP script daily at the end of each day, sending out emails and updating the database.. I have no idea how to do it in PHP..

From what I read, cron seems to be the way, but my ISP did not installed it...

I heard you can wrapped PHP within some CGI code to let it run automatically, but I could not find any clear explaination. Would be great to get some help regarding any good ways to automatically run a PHP script.

Thanks for any help!

Posted: Wed Apr 16, 2003 7:23 pm
by Kriek
If you do not have access to crontab on your server then you could use the service provided by fastcron.com or install fake cron on your Server, providing you can execute CGI scripts. You can download the fake cron from smarterscripts.com.

Hope this helps.

Posted: Wed Apr 23, 2003 8:09 pm
by m3mn0n
If you are running windows...

Start > Programs > Accessories > System Tools > Scheduled Tasks > Add new task


I suggest adding a .url file so it opens the link in IE instead of an editor for php. :)

Posted: Thu Apr 24, 2003 6:58 am
by []InTeR[]
On linux, i made a cronjob to a cgi script that looked like this.

Code: Select all

#!/usr/bin/perl
require "http-lib.pl";
$p = &HTTPGet("/page.php","www.domain.com",80,"?foo=bar");
print $p;

Posted: Thu Nov 25, 2004 6:17 pm
by papayiya
Kriek wrote:If you do not have access to crontab on your server then you could use the service provided by fastcron.com or install fake cron on your Server, providing you can execute CGI scripts. You can download the fake cron from smarterscripts.com.

Hope this helps.
I used fastcron -- but for some reason the site is down for a while ... I use http://www.webbasedcron.com -- it's reliable and hasn't been down

Good luck