google apps script - What's the program flow to implement a user-created trigger and then delete it if the anonymous user quit? -


My app is implemented from Google Sites.

The link on the site is public. The user clicks on the link to run the public script.

Public Script doGet () creates a fresh spreadsheet and stuffs filled with this formula. Also creates an edit trigger, when the user makes changes to the spreadsheet, some other project libraries run the functions and the users respond back to the spreadsheet.

The user terminates the work or expires or disconnects. Whatever, the user killed the browser that was running the site (container page) and spreadsheet.

OK, the trigger does not appear in the list of triggers in my (boss) project, so I'm pretty sure - and Google Scripting Guide - This trigger belongs to the user's project space Now the trigger is orphaned

What is the flow of the program to be able to implement triggers created by the user and delete the user when they leave?

I think I triggered orphans - as long as the user does not return to the site daily and ultimately make many triggers from doGet ().

This is normal for Google-Apps to leave the trigger unstoppable, and if you often try to stop users from triggers, you can recreate the triggers created by the old user of that project. Can you see in doGet () before?

Thank you!

When you create a trigger, you can also create a timer trigger that will kill itself and its All friends can trigger after a certain time ... not ideal and not tested but this should work.


Comments