views:

101

answers:

3

Hello,

I wanto call a PHP script using Google App Engine. I just want to execute the script. The script updates a couple of databases on my webhost. But I guess Google App waits for the response. Is there a way by which I can start the script.

The script takes some time and Google App might die during that time.

+2  A: 

Can you not modify the PHP script to simply execute a background task, and return a 200 confirmation? In any case, if simply issuing a GET to that script will start a task, you can do that with AppEngine with an asynchronous URLFetch (http://code.google.com/appengine/docs/python/urlfetch/asynchronousrequests.html) and simply wrap the call in a try/except and ignore the exception.

rlotun
Modifying the PHP script should even be needed. I think that the asynch fetch will do just fine.
Adam Crossland
A: 

Why not rewrite what your php script does in python? Php is a awful scripting language, and considering your thinking about calling it from inside a very powerful language, why not do it all in python

Taos
+1  A: 

Just do a URLFetch request. If the PHP page takes longer than 10 seconds to return, that doesn't matter (presuming you don't care about the response) - it'll complete execution anyway.

If you wish, you can do an asynchronous http request to avoid waiting for completion.

Nick Johnson