Re: PHP script: need a scheduled task!!!
| From: | Chris Adams | Date: | Fri, 07 Jul 2000 18:02:03 +0000 |
| Subject: | Re: PHP script: need a scheduled task!!! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5427@lists.php.net to get a copy of this message | ||
"Zack Beatty" <ZackB@mamamedia.com> wrote in message
news:E56C286B7760D31189A2009027B0FF7304BA5CD5@missmuffet.mamamedia.com...
> Is there a way to schedule a php script to run at a certain time, such as
> with the Windows Task Scheduler. I need to query a database once a day at
> midnight. In Perl, I would simply use the Windows Task Scheduler to
execute
> the Perl script in the shell. However, with PHP, my script is web-based,
> and can only be executed via a web-browser. A task CAN be scheduled to
open
First, this isn't necessarily true. You can run the CGI version of PHP from
the commandline: php script.php
> an Internet Explorer window at any given time. However, it CAN'T be
> configured to go to a specific web page. Any suggestions? I've heard
that
> PHP can be compiled to run from the command prompt (which would
> theoretically solve my problem), but I'm not ready to pursue that route.
Use one of the programs like wget that can retrieve URLs: wget
http://myserver/script.php?Mode=themode&parm2=anotherparm
I've used this a couple times to script scheduled tasks; toss the entire
thing in a batch file and schedule that to be run with the windows
scheduler.