RE: [PHP-WIN] scheduling tasks
| From: | Olav Bringedal | Date: | Mon, 28 Apr 2003 08:01:51 +0000 |
| Subject: | RE: [PHP-WIN] scheduling tasks | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-19647@lists.php.net to get a copy of this message | ||
Since this is the Windows list, i take the chance and answer how i did it on XP
:)
I created a batch file that does some sql fixup, and append the result to a
log.
@"c:\program files\php\cli\php.exe" E:\www\admin\sql.php
>>e:\www\log\.maintainance.log
in the sql.php, I set the first line to:
ini_set ( "error_log", "e:\www\log\maintainance.log");
this seem to solve the problem with print not always working, not to mention
error reporting, which on my system runs trough apache.
If you want a totally web based schedule try wget.exe from cygwin intstead of
php.exe. I havent been able to make an appending log with that one, though.
hope this helps..
olav bringedal
jaggu.org
--- Warren Vail <warren@vailtech.net> wrote:
> 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).
>
>
> 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:
> 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
=====
--
Olav Bringedal
jaggu.org
__________________________________________________
Yahoo! Plus
For a better Internet experience
http://www.yahoo.co.uk/btoffer