RE: [PHP-WIN] scheduling tasks
| From: | Warren Vail | Date: | Sat, 26 Apr 2003 20:06:24 +0000 |
| Subject: | RE: [PHP-WIN] scheduling tasks | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-19637@lists.php.net to get a copy of this message | ||
Easy enough, however the solution depends on your platform.
Some windows machines have an "at" command that will schedule tasks (I have
used this on NT workstation, but had problems on nt server, seems the
implementation of ms sql server replaced this with one that could not be
executed from command line).
Most unix machines have "cron" which gets it's instructions from a file
called "cron.tab" and there are Cron look alikes that run on windows (check
out http://www.moochers.com/ , utilities, system tools).
syntax for running php in batch is something like
/apache/php/php.exe /apache/htdocs/myscript.php
be aware that when you run php outside the web server (which is what you are
proposing), some things don't work;
echo output seems to disappear;
suggest you use logging to document how your process went
hint: if you include the year and month in the log file name, you start a
new log file every month.
good luck,
Warren Vail
warren@vailtech.net
-----Original Message-----
From: Matt Palermo [mailto:mpalermo@vt.edu]
Sent: Saturday, April 26, 2003 12:43 PM
To: php-windows@lists.php.net
Subject: [PHP-WIN] scheduling tasks
Anyone know if there is anyway to schedule a script to run every so often on
a web server? For example, I have a script that I would like to run
everyday, but I don't feel like going to the page every single day to have
it run. Anyone got any ideas?
Matt
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php