Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

187
Views
¿Cómo volver a ejecutar y detener el script de la aplicación según la información del registro de ejecución?

Estoy buscando ejecutar debajo de la secuencia de comandos de la aplicación con múltiples url var como

 https://www.testurl.com/link1=processing https://www.testurl.com/link2=processing https://www.testurl.com/link3=processing

Cómo agregar varias URL al siguiente código:

 function url() { var url = 'https://www.testurl.com/link1=processing'; var options = { 'method': 'get' }; var response = UrlFetchApp.fetch(url, options); Logger.log(response); }

Cada ejecución con una sola URL se muestra debajo del registro de ejecución

 3:33:30 AM Notice Execution started 3:33:31 AM Info {"status":200,"message":"Import 25 of 200 completed."} 3:33:31 AM Notice Execution completed

Estoy buscando volver a ejecutar el script para la primera URL hasta que reciba el mensaje de registro que contiene "no se activa" y luego ejecutar la segunda URL y volver a ejecutar hasta que reciba el mensaje de registro que contiene "no se activa" y luego ejecutar la tercera URL y volver a ejecutar hasta que obtenga el mensaje de registro que contiene "no se activa" y luego se detiene.

 3:33:30 AM Notice Execution started 3:33:31 AM Info {"status":403,"message":"Import #16 is not triggered. Request skipped."} 3:33:31 AM Notice Execution completed
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Realmente no hay forma de que pruebe esto, pero creo que ilustra cómo se puede hacer:

 function getUrls() { try { var urls = [ 'https://www.testurl.com/link1=processing', 'https://www.testurl.com/link2=processing', 'https://www.testurl.com/link3=processing' ]; function getUrl(url) { var options = { 'method': 'get' }; var response = UrlFetchApp.fetch(url, options); while( response.message.indexOf("is not triggered") < 0 ) { Logger.log(response); response = UrlFetchApp.fetch(url, options); } } urls.forEach( getUrl ); } catch(err) { Logger.log(err); } }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!