Running a php script in the background in Windows
Posted: Tue Feb 27, 2007 1:17 pm
I'm trying to take one of my php scripts and run it in the background. I've seen a lot of posts on how to do this, and it seems like the following should work, but it's not.
I think it might be due to the fact that I'm using Windows. I found one work around, which is to use a batch file as a wrapper for the php script and then just call the batch file, but I have quite a few POST variables and I have no idea how to get them all from the calling script to the batch file and then to startJob.php.
I was hoping someone might be able to tell me of an easier way to do this, i.e. without using a batch file.
Thanks
edit: i'm thinking that using ajax should work, although that's probably not the best solution
Code: Select all
exec ("startJob.php > /dev/null &");I was hoping someone might be able to tell me of an easier way to do this, i.e. without using a batch file.
Thanks
edit: i'm thinking that using ajax should work, although that's probably not the best solution