Search code examples
google-apps-scripttriggersquota

Understanding GAS Trigger Total Runtime Quota


I remember reading that Total Triggers Runtime is 1 hour for Consumer type users. I don't think I really understand what that means.

Let's say I programmatically create a trigger to run every 10 minutes, like so ...

ScriptApp.newTrigger("myFunction")
  .timeBased()
  .everyMinutes(10)
  .create();

... and let it run around the clock.

myFunction does something very not time consuming like appending a couple rows to a spreadsheet.

My question is, when am I going to hit the said '1 hour' limit?


Solution

  • As you can see under Apps Script quota:

    enter image description here enter image description here

    Those times refer to the total execution time of the function(s) that is / are being run on trigger.

    When you go on https://script.google.com/u/0/home/executions, you can see all your executions, you can also see the executions for a particular trigger.

    It should look like this: enter image description here

    So, if you sum the durations of all the executions of all the functions of type Trigger within the last 24 hours - it cannot exceed the Triggers total runtime.