RE: [PHP-WIN] Re: exec() without waiting for completion in Win2k
| From: | Rich Gray | Date: | Mon, 09 Sep 2002 08:45:14 +0000 |
| Subject: | RE: [PHP-WIN] Re: exec() without waiting for completion in Win2k | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-15722@lists.php.net to get a copy of this message | ||
Noel
The task scheduler runs as the SYSTEM account which cannot access network
resources - can you change the user account the service runs under if you
run the original AT task scheduler or set up a new task and run it as a real
user account if you use the new IE5 upwards task scheduler ...
Rich
-----Original Message-----
From: Noel Llopis [mailto:llopis@comcast.net]
Sent: 09 September 2002 00:35
To: Rich Gray
Cc: php-windows@lists.php.net
Subject: Re: [PHP-WIN] Re: exec() without waiting for completion in
Win2k
On Sun, 08 Sep 2002 22:42:44 -0700
Rich Gray <richardgray@onetel.co.uk> wrote:
> Sorry ... I misunderstood (i.e. didn't bother to read your post fully!) -
> look into running the AT command to run the command asyncronously
>
> i.e.
> <?
> $time=date("H:i");
> exec(getenv('WINDIR').'\\system32\\at.exe '.$time.'
> C:\MyPath\MyScript.bat');
> ?>
Hmmm... Tempting, but there is one big problem. I just found out that
commands executed with AT don't have access to network drives or
settings. Some of this build process involves fetching data over the
network, so it won't work.
I even wrote a C program that calls spawn() on the command you pass on
the command line, but it didn't work either. I can't believe how
frustrating this is. All of which could have been accomplished with a
sinmple & under Unix :-(
Any other ideas? I think I tried just about everything I could think of.
Thanks.