My Google script, which I'm runnig from script.google.com
invokes a PHP script on a remote server. This PHP script works for a few minutes, maybe more.
How much time can the Google script wait for a response from server?
My Google script, which I'm runnig from script.google.com
invokes a PHP script on a remote server. This PHP script works for a few minutes, maybe more.
How much time can the Google script wait for a response from server?
Check this advice from Google.
We do not increase script execution times on a per-domain basis. There are ways for you to accomplish your use-case without any increases, however. Instead of trying to do everything in one script's execution time, use a sequence of script executions (using triggers) to process batches of the overall job. You can use ScriptDB or another persistent datastore to keep track of the documents processed, and each subsequent triggered execution can read from this and pick up processing where the previous execution left off.
Better than "waiting" for the response, is making the PHP call a new function on GAS (sorta like a callback), to do this publish your GAS with the options "As me" and "Anyone, even anonymous". Then you can call the /exec
link with Get/Post parameters and continue executing the function.
This is ofcourse if your editor on the PHP page.