function myTrigger () {
var currentDate = new Date();
var year = currentDate.getFullYear();
ScriptApp.newTrigger(myFuncToTrigger ).timeBased().atDate(year, 0, 1).create();
}
I tried replacing atDate by eveMinutes(4) to check the behaviour, to no avail. I also thought of adding the
ScriptApp.newTrigger () into myFuncToTrigger (), but was afraid that would mean a trigger creation apocalypse (where the code
to create a new trigger is executed every 5 minutes, resulting in 2 triggers executing the code every 5 minutes, creating 2 new triggers etc, doubling every 5 minutes).
Could someone just point me to the right direction please ?
Cheers,