I'm working on an addon that needs to update spreadsheets in user specified intervals (from once an hour to once a year) - is there a smart, proven way to handle that with automatic trigger check/installation and multiple users between multiple spreadsheets?
From what I understand the triggers are installed individually per user - can anyone reveal the mystery behind how the time-driven triggers for add-ons work in the following cases?
1. The check whether triggers are installed doesn't 'see' if it's been been installed by other users and it can't manipulate it (eg. delete someone else's trigger when no longer needed). Any ideas on how to cope with that? Having 50 users with installed hourly triggers is not ideal.
2. Multiple spreadsheets with the addon installed: will the trigger run the called function in all of them simultaneously or do they require individual triggers per sheet? Dry testing seems to indicate that the triggers need to be set up individually per sheet, though would be great if someone could confirm their experience from an add-on that's already online.
In order to control a potential chaos I'm considering adding a 'last updated' property to scheduled update instances and have the triggered function compare the time difference between that and current time, but then it's still going back to having that function run every hour multiplied by the amount of users.
I hope the explanation is clear enough - please feel free to ask for clarification if need be. Any help would be greatly appreciated!