OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to programatically find and distinguish triggers in Apps Script?

  • Thread starter Thread starter mcansado
  • Start date Start date
M

mcansado

Guest
I have a function that updates a spreadsheet. It runs every morning and, every time it does, it creates 4 triggers. I also have time-driven triggers, which I want to keep there.

Since there is a limit on the triggers, I need to remove the triggers created by the function (while maintaining the other ones). However, when I run this:

Code:
function Triggers () {
  Logger.log(ScriptApp.getProjectTriggers())
}

I get this as a response:

Code:
 [Trigger, Trigger, Trigger, Trigger, Trigger, Trigger, Trigger, Trigger]

How can I identify, of these, the ones created by that function so I can eliminate those only?

Continue reading...
 
Top