Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

161
Vistas
How to programatically interupt and terminate an AppScript process?

I want to add a method stop process() to interupt and terminate currently running appScript script.

I removed all trigger, but it's not enough as the main thread (which wasn't trigger) is not to be seen on the triggers UI and hence continues running.

    function stop(){
      removeAllTriggers();
      exit;
    }


 function removeAllTriggers() {
  try {
    var triggers = ScriptApp.getProjectTriggers();
    for (var i = 0; i < triggers.length; i++) {
      // delete all triggers
      ScriptApp.deleteTrigger(triggers[i]);
    }
  }
  catch (e) {
    SpreadsheetApp.getActiveSpreadsheet().toast('Failed to cleanup triggers', '', TOAST_DISPALY_TIME);
  };
}

Is there a way to run exit; ?

about 4 years ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda